Ok I’ve got a dumb question: I want to run a rhino command, for example Rebuild, with the arguments/options set to specific values. Is there a way to do this completely by typing in the command? ie. I could run the command Rebuild(Point Count = 15, Degree=3) or create a similar custom alias for that?
Start the command with a dash or hyphen character, "-Rebuild"
The dash is how you start what we call the “scripted” version of the command, that only takes command line input with no dialogs.
Alright but how do I modify the options of that? When I run ‘-Rebuild’ I still get this window
instead of this window
I’m confused about the functional difference between the two.
Ideally I’d like to run the command, something like -Rebuild(Point Count=15, Degree=3) and have the command execute with those settings. Is that possible?
On the Windows side you would do this as -Rebuild Pause PointCount=15 Degree=3 Enter , you can then assign that to an alias or button. Not sure how well this translates to Mac Rhino however.
Some things on macro creation:
Hope that helps,
That did the trick, thanks!
When you start ANY “scriptable” command like “-Rebuild”, all of the dialog options are available on the command line.There is a letter underlined for each option. Typing that letter invokes the option.
So running a command that way are paying attention to what you have to type to do what you want are the key strokes that go in a macro.
The link I sent and the links Sam included have the additional detail you need to become at writing your own macros.
Not a dumb question, but apparently my answer was too sparse o’clues.
I would like to create my own aliased macros that I can pass parameters into but haven’t seen how yet.
The link that Sam posted above should explain how to do the basics, if that is not enough, please post a specific problem you are having creating a macro…
I have a simple macro called Sphere. I would like to call the macro with an argument that gets plugged into the radius of the SphereShell command each time it is run. For instance if I wanted radius to be 45 I would enter
I created an Alias called SphereShell with this in it.
_Box 70,70 -70,-70 " " Enter
Setobjectname box Enter
_Sphere 0,0,0 This is where the argument would get plugged in Enter
setobjectname inner Enter
Offsetsrf .2 Enter
setobjectname outer Enter
-_Selname outer Enter
booleandifference -_selname box Enter
-_Selname outer Enter
booleandifference -_selname inner Enter
_-ChangeLayer Layer1 enter
No, this will unfortunately not be possible with a macro. For this you would need a simple script to ask for user input - it would go something like this:
SphereShell "Outer diameter?" <user input/Enter> "Offset thickness?" <user input/Enter>
Here is a quickie python script that does this, just for illustration purposes…
CreateHemisphereShell2.py (998 Bytes)