Add a New Member to a Collection Object

AutoCAD ActiveX

 
Add a New Member to a Collection Object
 
 
 

To add a new member to the collection, use the Add method. For example, the following code creates a new layer and adds it to the Layers collection:

Dim newLayer as AcadLayer
Set newLayer = ThisDrawing.Layers.Add("MyNewLayer")