# Set options in a macro

**URL:** <https://discourse.mcneel.com/t/set-options-in-a-macro/23359>\
**Category:** Rhino for Mac\
**Created:** [August 11, 2015, 9:45am UTC](https://discourse.mcneel.com/t/set-options-in-a-macro/23359 "2015-08-11T09:45:37Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![maxz](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/maxz/32/551583_2.png) [@maxz](https://discourse.mcneel.com/u/maxz)\
**Post date:** [August 11, 2015, 9:45am UTC](https://discourse.mcneel.com/t/set-options-in-a-macro/23359/1 "2015-08-11T09:45:37Z")

</div>

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.

Max.

---

<div class="post-metadata">

**Author:** ![wim](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/wim/32/747482_2.png) [@wim](https://discourse.mcneel.com/u/wim)\
**Post date:** [August 11, 2015, 11:05am UTC](https://discourse.mcneel.com/t/set-options-in-a-macro/23359/2 "2015-08-11T11:05:26Z")

</div>

Doesn’t

> ! \_ExtractSrf \_Pause \_UnrollSrf \_KeepProperties=Yes \_Enter \_Delete

work?

---

<div class="post-metadata">

**Author:** ![maxz](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/maxz/32/551583_2.png) [@maxz](https://discourse.mcneel.com/u/maxz)\
**Post date:** [August 11, 2015, 4:05pm UTC](https://discourse.mcneel.com/t/set-options-in-a-macro/23359/3 "2015-08-11T16:05:27Z")

</div>

No, I tried that. “Unknown Command”.

---

<div class="post-metadata">

**Author:** ![wim](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/wim/32/747482_2.png) [@wim](https://discourse.mcneel.com/u/wim)\
**Post date:** [August 11, 2015, 4:44pm UTC](https://discourse.mcneel.com/t/set-options-in-a-macro/23359/4 "2015-08-11T16:44:12Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![dan](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/dan/32/481637_2.png) [@dan](https://discourse.mcneel.com/u/dan)\
**Post date:** [August 12, 2015, 9:04pm UTC](https://discourse.mcneel.com/t/set-options-in-a-macro/23359/5 "2015-08-12T21:04:09Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![maxz](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/maxz/32/551583_2.png) [@maxz](https://discourse.mcneel.com/u/maxz)\
**Post date:** [August 13, 2015, 7:20am UTC](https://discourse.mcneel.com/t/set-options-in-a-macro/23359/6 "2015-08-13T07:20:26Z")

</div>

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,

Max.
