I’m wondering if there’s any explanation on the different uses and methods of alias, command item scripts, and python scripts.
Hi James - Aliases run Rhino commands or macros made up of multiple Rhino commands and options, what I assume you mean by ‘command item scripts’ ; Python allows more interaction with Rhino under the hood - it is coding, very powerful, if not up to ‘real’ programming. Python scripts are executed by RunPythonScript (which can itself be included in a macro) or -RunPythonScript “Script file path”.
Dunno if that clarifies anything…
It helps a bit. I’ve set up some commands that run a script combo, for instance: ( '_SetView _World _Perspective _CPlane _World _Top). That then is given a menu icon that’s a ? and I can assign a keystroke combo to activate it. I was given a little python script by Mitch I want to use that’s located in the support folder. I thought I could activate it by setting up the path in the script area of the command options dialogue. Is it necessary to set up an alias and then place the alias in the keystrokes option in the dialogue (see picture)
Well, trying to set up a screen shot shows another issue - that is the command I’d set doesn’t show up in a search so I can show the dialogue boxes mentioned.
To run the python script from an alias, put this in the Alias definition-
! _-RunPythonScript "Full path and file name"
or from a button, but that same macro in the button’s command area.(where it says ‘Script’)
does that work?
In Mac Rhino, if you place the script in the default “scripts” library folder, you can also run it simply with the script name:
! _-RunPythonScript "filename"
The default folder is located at:
I had to leave for awhile. Back now. I made a vid of the problem I mentioned.
2015-10-23_11-59-49.mp4 (5.4 MB)
No. Please see vid uploaded.
A little off topic from the thread title, but I am getting this here also, in both WIP & 5.1.
If you create a new Command in the bottom left (all commands) it does not stay by saving.
You can only save the command by associating it to a palette, is this normal?
It doesn’t show in the all icons section at the bottom left.
Looks like a bug to me. Thanks for reporting. I’ve logged it in MR-2377…check out the bug report for a workaround (for now).
Wow, I found a bug rather than display my ignorance ! ?
Can we call it “jimmy’s bug”
As you wish
YouTrack is a bit of a beast…so we don’t expect anyone to be paying attention But, if you do want to use it, it’s a big help to us. Here are some tips if you are interested. If not, we’re not offended. But, with just some basic youtrack searches, you can get a sense of what features, fixes, and bugs will be in which releases and WIPs.
Way cool @dan, just what I love another diversion. Thanks
That’s funny - it says “9 months Later” over you post. Such a natural process…
Thanks for the heads up Dan.
Better late than never. Check this one out.
Three years. I’d wish I’d known about the mac version back then.