I have come across this python script to run a Array Between command, it is a py file. Could anyone please give me some steps on how I can make this a command that I can shortcut, or type in the name of to run please?
I am using mac and rhino 8.
follow the windows instructions - rhino 8 on Mac behaves more or less like this. (EDIT: regarding toolbar / button editing)
You can use _macroEditor to test if the script is found / if your macro is correct:
! _-RunPythonScript "<full path to your script including extension>"
then copy the working macro from the macroeditor to an alias or button.
Thank you!
So I have set up a macro ,its working to run the python script, I added this as a button and into a new custom toolbar, as well as an alias.
However If I type in the actual name of the command in the command bar, which is âArray Betweenâ it doesnât find it, is there a way to set that also? Or did I go wrong somewhere ?
A couple of things perhaps⌠First, you cannot have spaces in command names. Thus you cannot have an alias or command that is Array Between (with a space between array and between). It could however be ArrayBetween.
Second when you create an alias to run a script, the alias name IS the command. The actual name of the script file or any of the subroutines in it donât matter at all.
Looking at the macro itâs just the name of the macro set to Array Between with a space so I donât think that will affect it here.
My alias is set to AB, which works nice as a shortcut. But like on other commands as you start typing the name of them in the search it brings up the results of commands.
A space is interpreted as Enter in a macro as well, unless the entire thing is enclosed in quotes.
If AB is an alias for another command, when you type it, it will not autocomplete to the command it is calling. However, if you type just âaâ, you should see âabâ in the autocomplete list with all the other commands that start with âaâ. I.e. any alias names you have are included in the autocomplete suggestion list.
If you want your command to be called ArrayBetween, then use that for the alias instead of AB (you could even have both that call the same script if you want). That way if you type âarrâ for example, you will get all the array commands showing up in the autocomplete suggestions, including ArrayBetween.
Ahhh I see, I now have made two separate aliases one is AB, and the other ArrayBetween, both with the same script command to run, and seems to work as I intended now with both options to run!
I guess my confusion was thinking aliases were just a shortcut to a command, and creating a new command was something else