I have a C# command I want to call from Python that looks roughly as follows.
(C# logic to delete non-Brep objects that were imported)
-_PickMotionAxis ‘object1’ w0,0,0 w0,1,0
The arguments I want the command to consume are shown in bold. So from a top level I want the command to be able to consume these arguments from RunScript call like this (from python)-
rs.Command("-_MyCommand filename w0,0,0 w0,1,0 ")
The arguments should be consumed in the order I hand them over to the top-level call. In practice I find that not all arguments make it to their final location. You can see the w0,0,0 point is treated like another command even before the context gets to the PickMotionAxis sub-command. So by the time this final sub-command is called, it asks for the point I already tried to send it.
Imported 106 entities from IGES file myfile.igs.
File " myfile.igs" successfully read
File " myfile.igs" imported successfully.
Unknown command: w0,0,0
Change SelLast option. Press Enter when done ( DeselectOthersBeforeSelect=Yes ): _Enter
Change SelLast option. Press Enter when done ( DeselectOthersBeforeSelect=Yes ):
106 surfaces added to selection.
Specify the name <0>: object1
–Prompted for point argument here, which I attempted to hand to the Run method.