Sending parameters to program via RunPythonScript

I’m all about creating calls to rhino.python and then calling that with a customized macro attached to an icon. Typically I use:

!_-RunPythonScript ScriptName.py

but in my latest usecase I’d like to pass the program some arguments. So…

!_-RunPythonScript ‘ScriptName.py fee fi foo fum’

would be really helpful. But that doesnt seem to work. I’ve tried enclosing in double quotes, parens and single quotes.

I want to avoid having the program perform making a call to a dialog box, and simply pass in the parameter if that particular icon is selected.

Running Rhino for Mac. Thanks much.

owen

Hi Owen, you might check out my answer in this thread.

c.

Thank you. I also stumbled on this thread as well. Your rs method helps in terms of simplicity, the RhinoCommon approach allows me to specify options like:

!_-RunPythonScript ScriptName.py _Vertical=True

All I know is I love rhino.python.