The Collection Objects

AutoCAD ActiveX

 
The Collection Objects
 
 
 

AutoCAD groups most objects in collections. Although these collections contain different types of data, they can be processed using similar techniques. Each collection has a method for adding an object to the collection. Most collections use the Add method for this purpose. However, entity objects are usually added using a method titled Add<Entityname>. For example, to add a line you would use the AddLine method.

Collections also have some other methods and properties in common. The Count property can be used to obtain a zero-based count of the objects in a collection. The Item method can be used to obtain any object within a collection.