Make a Layer Active

AutoCAD ActiveX

 
Make a Layer Active
 
 
 

You are always drawing on the active layer. When you make a layer active, you can create new objects on that layer. If you make a different layer active, any new objects you create are created on that new active layer and use its color and linetype. You cannot make a layer active if it is frozen.

To make a layer active, use the ActiveLayer property. This property is set on the current drawing. For example:

Dim newlayer As AcadLayer
Set newlayer = ThisDrawing.Layers.Add("LAYER1")
ThisDrawing.ActiveLayer = newlayer