Call EditPythonScript in code and pass file name

(Alain Cormier) #1

I can open the python script editor with


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


(Steve Baer) #2

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

(Alain Cormier) #3

Hi Steve,

Hmmm. I could really use that feature :frowning:


(Steve Baer) #4

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

(Alain Cormier) #5

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

(Alain Cormier) #6

I mean write my own version of the command.

(Steve Baer) #7

No, the editor is not accessible outside of the command

(Alain Cormier) #8

Ok. Thanks

(Brian Gillespie) #9

What would having that feature improve for you?

(Alain Cormier) #10

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.


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

(Steve Baer) #12

I created wishlist items for these features