Changing externally referenced Python path for a custom command?

Awhile ago, I somehow set up a couple of custom commands. When I type “rpom” into the command bar, it executes a RunPythonScript command, and points on an external file path to call it. I made a custom button for it.

The file path of that Python script has since changed, and I can’t remember where I actually established it in Rhino. I have spent a long time looking, and none of the documentation refers to what I remember doing. I remember it wasn’t hard, somewhere in the preferences I was able to add a custom command and paste in the path of the Python script.

I had also embedded the entire Python script into the right-click version of the button, but it does not execute correctly the way that calling on the external path does.
I have:
! _-RunPythonScript (

script here


I think my version of Rhino may have gotten updated somewhere along the line (haven’t used this in awhile), so I am wondering if some things got moved around and this is why I can’t find how to fix the path?


Hello - in Options > Aliases is where you’ll find the ‘rpom’ macro pointing at the py file.


1 Like

Hah, not sure how I managed to pass that one over after all the poking around! Thanks so much for the quick reply.

As for the second question, any idea why the Python script isn’t executing when embedded in the custom button?

Hello - if you have the

if __name__ == '__main__':

at the end of the script, remove that to run it from a button.


Yes, it did have that command near the end, followed by DefName() on the line below. In order to get things to execute, I had to untab that line.

Thank you for the guidance!