Delete a Member of a Collection Object

AutoCAD ActiveX

 
Delete a Member of a Collection Object
 
 
 

To delete a specific dimension style, use the Delete method found on the member object. For example, the following code deletes the layer ABC:

Dim ABCLayer as AcadLayer
Set ABCLayer = ThisDrawing.Layers.Item("ABC")
ABCLayer.Delete

Once an object has been deleted, you must never attempt to access the object again later in the program.