About Adding a New Member to a Collection Object (ActiveX)

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:

AutoLISP
(setq acadObj (vlax-get-acad-object)
      doc (vla-get-ActiveDocument acadObj)
      layerCollection (vla-get-Layers doc))
(vla-Add layerCollection "MyNewLayer")
VBA (AutoCAD Only)
Dim newLayer as AcadLayer
Set newLayer = ThisDrawing.Layers.Add("MyNewLayer")