If the ACT object is run as part of the solution being generated, such as a load object under the analysis branch, then the Outline object structure is fixed. It is not allowed to change it at that stage because as the APDL input file is written (generally in the order of Outline objects seen from top-to-bottom) certain Outline objects depend on others such as loads/supports written in certain coordinate systems defined higher. Changing some Outline objects at solution time could invalidate other Outline objects.
With control=”scoping” in the XML, why not just have the user selection a named selection instead of geometry selection? Vertex, edge, face selections create nodal components in APDL while body and element selections cause element components in APDL. So instead of converting to an element named selection, you could enforce body/element selections when “geometry” type is selected for control=”scoping”:
Or document your extension that the user needs to select named selection from the dropdown and select a body or element named selection.
Or use control=”select” to make a manual dropdown and populate the list with only those named selections for which your code has checked are body or element named selections.
Or instead of a "load" use an "object" as a load: