Adding and Removing Items

You can add individual entities to and remove individual entities from a group by using the AppendItem and RemoveItem methods (see Table 12-11 for parameter details). These methods take an array of entities as a parameter. Both methods raise exceptions if they're unable to append or remove all the entities in the array. So if you try to append three items and one of them is already a member of the group, an error is raised and none of the items will be appended.

GroupObject.AppendItem(Entities)

GroupObject.RemoveItem(Entities)

Table 12-11. The AppendItem and RemoveItem Method Parameter

Name

Data Type

Description

Entities

Array of AcadEntity objects

The entities to append to or remove from the group

0 0

Post a comment