This document is archived and information here might be outdated. Recommended version. |
ArcObjects Help for .NET developers > ArcObjects namespaces > Carto > ESRI.ArcGIS.Carto > Interfaces > IF > IFeatureSelection Interface (ArcObjects .NET 10.5 SDK) |
Provides access to members that control feature selection.
Description | ||
---|---|---|
Add | Adds a feature to the selection set. | |
BufferDistance | Buffer distance used for the selection. | |
Clear | Clears the selection. | |
CombinationMethod | Combination method for the selection. | |
SelectFeatures | Selects features based upon the specifed criteria and combination method. | |
SelectionChanged | Fires the features layer update event. Required when SelectionSet changes. | |
SelectionColor | Selection color. (used when SetSelectionSymbol=FALSE). | |
SelectionSet | The selected set of features. | |
SelectionSymbol | Selection symbol. | |
SetSelectionSymbol | Indicates if the selected set of features is drawn using the SelectionSymbol. |
CoClasses and Classes | Description |
---|---|
CadAnnotationLayer | An Esri Cad annotation layer. |
CadastralFabricSubLayer | Cadastral Fabric Feature Layer Object. |
CadFeatureLayer | Esri CAD Feature Layer class. |
CoverageAnnotationLayer | An Esri coverage annotation layer. |
DimensionLayer | A collection of properties for a dimension layer. |
FDOGraphicsLayer | A collection of properties for an annotation layer (feature data object graphics layer). |
FeatureLayer | A collection of features and their visual representation. |
GdbRasterCatalogLayer | Geodabase RasterCatalog source and display options. |
ImageServerLayer | Image server layer source and display options. |
IMSSubFeatureLayer | A collection of IMS features as a sublayer of an IMSMapLayer. |
TemporalFeatureLayer (esriTrackingAnalyst) | Defines the coclass IDL parameters and attributes of the TemporalFeatureLayer COM object. |
IFeatureSelection is a very useful interface to manage or perform selection on a layer or to modify the way the selection is displayed.
The following methods and properties are useful to manage the selection:
The CombinationMethod property is not used.
SelectionSet returns a SelectionSet corresponding to the current selection on the layer.
Clear will clear an existing selection.
Add adds one single feature to the selection.
SelectFeatures will perform a selection based on a query filter. If nothing is used as a query filter all the features will be selected. You can also specify a combination method. The justOne parameter tells the search to stop once it has found one feature.
Call SelectionChanged after modifying SelectionSet to fire update events on the layer.
The following methods and properties are useful to modify the way the selection is displayed:
SelectionSymbol will return or set the symbol used to display selected features on the layer.
SetSelectionSymbol is a boolean used to indicate if the SelectionSymbol is used or not to draw the selection. For feature layers, this is similar to using the "Show selected features...with this symbol" option in the layer properties.
SelectionColor is equivalent to using the "Show selected features...with this color" option in the layer properties.
If BufferDistance is set to a value greater than 0, a buffer will be drawn around the selected features. This is similar to using the Buffer Selection tool that can be added to the map with the Customize command found in the Tools menu.