When I create a macro using the macro editor, I can make multi-line macros, like this:
-options
modelingaids
nudge
step=1
enterend
But when I try to do the same in RhinoScript or PythonScript (is it called pythonscript?), I can’t do that. For instance, in RhinoScript, this doesn’t work:
Rhino.command “-options”
Rhino.command “modelingaides”
Rhino.command “nudge”
Rhino.command “step=1”
Rhino.command “enterend”
And in python, the same doesn’t work (rs.command ("-options") etc)
Instead, I have to make it all one line, like
Rhino.command “-options modelingaids nudge step=1 enterend”
But when I look at documentation for PythonScript, I read that I should break rhino commands into separate lines instead of a single long line:
Note, this function is designed to run one command and one command only.
Do not combine multiple Rhino commands into a single call to this method.
WRONG:
rs.Command("_Line _SelLast _Invert")
CORRECT:
rs.Command("_Line")
rs.Command("_SelLast")
rs.Command("_Invert")
So, is this a documentation error, bug, or am I just doing something wrong?
Basically, if I try to do the following in python (or rhinoscript,) rhino stops after running “-options”. Why?
def simpleFunction():
rs.Command ("-options")
rs.Command (“ModelingAids”)
rs.Command (“Nudge”)
rs.Command (“step=1”)
rs.Command (“enterend”)