Loading a Python Custom Command


#1

Question 1: (basic and probably my fault)

Using the python Editor, I created a hello command going to file -> new -> command , and putting in hello for command name and hello for the plug-in

It has some default prints and whatnot, but I just want to call the command from inside Rhino ?
But cannot figure out how to get it to run, or what documentation to look at

I just want to initially type “hello” and run the hello world script in the Rhino prompt.

Question 2:
Are python commands similar in a way to C++ such that once its loaded/installed its loaded … you have to restart rhino to get it unloaded to test your change?


#2

I believe this is the same question I asked fairly recently, with the solution being to create an alias to RunPythonScript. Regarding the second part, once your script is loaded into Rhino’s python environment it will be available until you exit Rhino.

See here: Creating commands/macros with Python


#3

Thanks for the answer ICS, that is a very useful discussion

But I am making a differentiation between a plug-in vs a Rhinoscript

I’m coming from the Maya world … where it seems similar in set up where there are c++/c#/python plugin commands, and python/mel scripting … and python can do both . It looks like python and Rhino is similar, and its right to set up a command that uses Rhinoscript but say I wanted to set up a plug-in and command that used Rhinocommon etc …