Set options in a macro

I have created this little macro in Rhino for Mac:

! _ExtractSrf _Pause _UnrollSrf _Enter _Delete

It works OK, however I want to set the option “Keep Properties” to Yes for the UnrollSrf command as part of the macro. The default is No, so I have to remember to run the bare UnrollSrf command and set the option to Yes every time I start a session. Luckily it is persistent, but if I can work it into the macro so much the better.



! _ExtractSrf _Pause _UnrollSrf _KeepProperties=Yes _Enter _Delete

No, I tried that. “Unknown Command”.

@dan, @marlin can that be checked for buggy behavior on the Mac side? It works on win.

I just tried this…I’m probably being dense, but this works for me. Here’s what I did:

  1. Rhinoceros > Commands > Customize…
  2. Selected My UI Scheme custom tool set.
  3. I have a Modified Palette called Testing Tool Palette which I have loaded into the left-sidebar in my Custom theme.
  4. Added a Macro called Extract Unroll to Testing Tool Palette with the following macro:

! _ExtractSrf _Pause _UnrollSrf _KeepProperties=Yes _Enter _Delete

Save, started a new modeling window, created a Box, selected a surface and…

Command: _Box
Command: _ExtractSrf
Select surfaces to extract ( OutputLayer=Input Copy=No )_Pause
Extracted one surface.
Command: _UnrollSrf
Select curves on surface to unroll ( Explode=Yes Labels=No KeepProperties=No )_KeepProperties=Yes
Select curves on surface to unroll ( Explode=Yes Labels=No KeepProperties=Yes )_Enter
Command: _Delete
Area difference is within tolerance.
One surface unrolled.

…and it all seems to work. No “Unknown Command.” What am I missing here? Probably something obvious.

It seems I am the one missing something obvious: a missing space following “Yes”. Sorry for that.
So, what did I learn today:

  • In a macro, underscores are not command separators, spaces are. (I remember now, underscores are a reference to the base english language command library, so the macro will work in any language setting)
  • I should read any error messages more carefully, so I would have noticed that the “unknown command”-message referred to a concatenation of two commands, “KeepProperties=Yes” and “Delete”. Comparing it with Dan’s command listing made me realize that.

Thanks Dan,