Provides access to members that control a simple set of objects.
The ISet interface provides properties and methods for adding objects, removing objects, and sequentially accessing objects in a Set.
The Set object holds a collection of homogeneous or heterogeneous objects.
| Description | ||
|---|---|---|
![]() |
Add | Adds an object to the set. |
![]() |
Count | The element count of the set. |
![]() |
Find | Searches for the object in the set. |
![]() |
Next | Returns the next object in the set. |
![]() |
Remove | Removes the object from the set. |
![]() |
RemoveAll | Removes all objects from the set. |
![]() |
Reset | Resets the set for enumerating through the objects with Next. |
| CoClasses and Classes | Description |
|---|---|
| GroupFeedback (esriDisplay) | Feedback for a group of feedback objects. |
| ObjectList (esriTrackingAnalyst) | ObjectList Class. |
| Set | Generic set of objects. |
When declaring a variable for the Set object, using the variable name pSet or pset will raise a Visual Basic compile error. When instantiating the Set object, use New esriSystem.Set instead of New Set. The word Set is a reserved word in Visual Basic.
The code below adds the selected features in an edit session to a Set. They could then be moved together with a call to IFeatureEdit::MoveSet.
Dim pMySet As esriSystem.ISet
Set pMySet = New esriSystem.Set
Dim pEnumFeature As IEnumFeature
Set pEnumFeature = pEditor.EditSelection
pEnumFeature.Reset
For Count = 0 To pEditor.SelectionCount - 1
Set pFeature = pEnumFeature.Next
pMySet.Add pFeature
Next Count