AutoCAD VBA Programming: Tools and Techniques

Chapter Five: Working with Entity Collection Objects

A collection object is a set of things all collected into one object. A group of entity objects can be considered a collection as can a list of text styles. This chapter explores the basic concepts behind collections and how to work with them. We will give specific attention to entity collections.

The Collection Object

A collection object provides a mechanism by which several items, data or other objects, can be linked together and referenced as a singular item. The easiest way to view a collection is to think of a selection or pick set. A selection set results when you are picking entity objects such as in the COPY or MOVE commands. A selection set can have any number of entity objects in it, and these objects can be of any type ranging from lines to block insertions referencing even more objects. The collection of objects can then be referenced as a single item. Say the AutoCAD operator wants to both move and rotate a set of objects. For the first command, he or she needs to select the objects to be manipulated but in the second command, he or she can use the "previous" selection set. Obviously, this reduces the amount of work since the operator can reference the entire collection of objects as a single item.

In Visual BASIC, a collection object is like an array or a list. The main difference is that every element does not have to be of the same data type. In some applications...

UNLIMITED FREE
ACCESS
TO THE WORLD'S BEST IDEAS

SUBMIT
Already a GlobalSpec user? Log in.

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.

Customize Your GlobalSpec Experience

Category: LiDAR Sensors
Finish!
Privacy Policy

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.