API to EditPythonScript at a given location

Hi there,

I am writing a C# rhino common plugin which generates python code.
I would like to show the generated python code in Rhino’s EditPythonScript dialog and benefit from its syntax highlighting and code completion features.

Is there a way to programmatically instruct the EditPythonScript command to open a given file, e.g.
EditPythonScript “/the/python/file/which/i/generated.py”.

So far I only managed to open a file in EditPythonScript with user interaction via “File - Open”.

Many thanks for your reply.

Hi @Andrin,

The EditPythonScript command doesn’t have an option for doing this. But it seems like a reasonable request.


Note, the editor is being overhauled for Rhino 8. So if this issue is worked on, this is where you’d see it.


– Dale

1 Like