Basic Macro To Switch Layer then Add a Detail

Hello, I’m just starting to dive into making custom buttons/macros in Rhino and was wondering the best way to change layers using a script/macro.

I keep all my details on one layer, so I’d love to make the add detail button, or an alias, switch from whatever layer I’m on to a specific layer, then run the add detail command after switching layers.

Any help would be greatly appreciated,

Thanks!

Hi @tdi07, a simple button macro to change the current layer to “MyLayer” would be:

! _-Layer _Current “MyLayer” _Enter

To add a new Detail, you could use:

! _Detail _Add

Of course you can do all this with Python scripts too…

_
c.

Thank you for the help Clement, this is exactly what I’m looking for! I have yet to dive into any Python scripts yet, as coding is not a strength of mine but maybe soon!