This document is archived and information here might be outdated. Recommended version. |
Provides access to members that manage a set of selected table rows or features. Note: the ISelectionSet interface has been superseded byISelectionSet2. Please consider using the more recent version.
Name | Description | |
---|---|---|
Add | Adds an object id to the selection set. | |
AddList | Adds a list of object id's to the selection set. | |
Combine | Combines this selection set with another selection set using the specified set operation. | |
Count | The number of oids in the selection set. | |
FullName | The full name of the selection set. | |
IDs | Enumerates the object ids in the selection set. | |
MakePermanent | Makes the SelectionSet permanent. By default SelectionSets are deleted when released. | |
Refresh | Refreshes the state of a snapshot selection. | |
RemoveList | Removes a list of object id's from the selection set. | |
Search | Returns a cursor that can be used to retrieve the objects specified by a query over this selection set. | |
Select | Returns a new selection That contains the object ids selected by a query over this selection set. | |
Target | The Table or FeatureClass over which the selection set is defined. |
CoClasses and Classes | Description |
---|---|
RelQueryTableSelectionSet | Esri RelQueryTable Selection object. |
SelectionSet | Esri Selection Set object. |
TMSSelectSet (esriTrackingAnalyst) | Controls the tracking selection set. |
A SelectionSet is used to reference a set of rows or features. This can be used to retrieve, process and select rows or features.
A SelectionSet can be obtained from IFeatureClass::Select or ITable::Select.
If you want to obtain a selection set on a feature layer it is good practice to cast the layer to the ITable interface then use the ITable::Select method. The table that you will obtain this way will mirror the content of the layer even if it has a definition query or a join.
The IFeatureSelection interface contains a SelectionSet property which can be used to access or set the selection on a feature layer. If trying to set the selection with this property you must make sure that the content of the selection set is compatible with the features currently in the layer. It is usually simpler to use IFeatureSelection::SelectFeatures instead.
Selection sets are also used in a number of other interfaces dealing with the selection: ITableSort, IFeatureSelection, ITableSelection, ISelectFeaturesOperation, to name a few.
There are three types of selection sets: ID sets, snapshots, and hybrids. A selection set's type is determined at creation time (for example, by the selType parameter of the IFeatureClass.Select method).
Two of the methods defined by this interface should not be used in .NET or Java applications - AddList and RemoveList. See the IGeoDatabaseBridge2 interface for interop-safe alternatives.