Call EditPythonScript in code and pass file name

Hi,
I can open the python script editor with

RhinoApp.RunScript("_EditPythonScript");

but can I pass it a script file to open it in the editor?

Thanks,
Alain

Hi Alain,
Nice idea, but no that is feature is not currently implemented.

Hi Steve,

Hmmm. I could really use that feature :frowning:

Thanks,
Alain

It would require a bit of a rewrite of the command since I would need to perform a “getstring” operation before firing up the user interface. I’ll make sure to add this to the wishlist for V6

I guess the Python editor is not exposed in a way that I could do that myself right?

I mean write my own version of the command.

No, the editor is not accessible outside of the command

Ok. Thanks

What would having that feature improve for you?

Hi Brian,
My plugin displays a list of files (.3dm, .py, .gh, .ghx, etc) and if the user double-clicks on a list item that represents a python file I want it to open in the Rhino python editor.
Thanks

While you’re at it @stevebaer maybe you could add drag and drop py script opening for the editor once it’s open… (vb Rhinoscript editor as well). Grasshopper has this feature and it’s really nice.
Thanks, --Mitch

I created wishlist items for these features
http://mcneel.myjetbrains.com/youtrack/issue/RH-19904
http://mcneel.myjetbrains.com/youtrack/issue/RH-19906