RunScript with python outside of the scripteditor

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:

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

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

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: (3.3 KB)

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