To make another layer current, perform a task and return to the original layer

Hey guys,
The macro to change the current layer to another specific layer is
! _-Layer _Current “xxxx”

To do this and run the detail command (as in Layout Detail) you would…
! _-Layer _Current “det” _Enter _detail _add _enter

My question is whether there is any phrasing that I could add to the end of the above macro that would return me to the original layer I was on before I switched layer by running the above macro?

Thank you.


Hi Cosmas,

Command line macros not not capable of this. You will need a script - either RhinoScript or Rhino.Python will work.

For example:

_NoEcho _-RunPythonScript (
import rhinoscriptsyntax as rs
current = rs.CurrentLayer('Layer 01')

– Dale

Thank you, Dale. I wonder if we’ll be able to do this in V6?

The script (above) works in the Rhino WIP, so…