Possible to run Python script by only inputting command in Rhino-Command?

rhinopython
python

#1

Main question is as title says. Is it possible to run a python script without having to go back to the script editor, but instead typing a command into the Rhino-Command text bar?


(Dale Fugier) #2

Rhino has a RunPythonScript command. Is this what you need?


#3

I found that the fastest way to run and edit my Python scripts is to create new buttons in the Standard Tool Bar. To access the Button Editor and create a new button, right click in the blank space to the right of the tool icons of the Standard Tool Bar and select New Button.

To run a script, put:
! _-RunPythonScript "Cavity6.py"
in the Command window of the Button Editor. Replace “Cavity6.py” with the name of your script.
To edit a script put:
_EditPythonScript
in the Command window of another button you create.

Once the button is created, then only 1-click is needed to run your script.

This is what my Standard Tool Bar now looks like:

I added the 4 buttons on the right. The PIC button is highlighted because I was using my PIC GUI to take this picture. Can you pick out the button for editing Python scripts?


#4

Sorry for the late reply. Yeahp, this is exactly what I need!