RunScript with python outside of the scripteditor

rhinocommon
python

#1

i try to run the export command with a pytthon script. If i running the script in debug_mode from the editor it is working fine

Rhino.RhinoApp.RunScript(command, True) returns True

but if i link the script to a button it stop working.

Rhino.RhinoApp.RunScript(command, True) returns False

I think it is part of this problem: http://developer.rhino3d.com/guides/rhinocommon/run-rhino-command-from-plugin/

The problem is that i dont know how to implement this with python


(Dale Fugier) #2

Hi @Felix1,

Can you provide a small sample script file that works inside of the EditPythonScript editor but does not work with the RunPythonScript command?

– Dale


#3

I didnt used “RunPythonScript” so far. With this command it works but it is not really what i want.

I buddled my script with a python-plugin so that i could call it direct.

As example:

Example_cmd.py (3.3 KB)

i like to run it just call “Example” inside the console