How do I change the current layer using python


#1

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


#2

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")

#3

@Holo, awsome!
Thanks!


#4

My pleasure!