How do I change the current layer using python

How do I change the active layer of the rhino document (Rhino.RhinoDoc.ActiveDoc) using python?

This is the official example:

  import rhinoscriptsyntax as rs
  rs.AddLayer("MyLayer")
  rs.CurrentLayer("MyLayer")

And to check if a spesific layer is current you use:

  rs.IsLayerCurrent("MyLayer")

@Holo, awsome!
Thanks!

1 Like

My pleasure!