This document is archived and information here might be outdated. Recommended version. |
ArcObjects namespaces > Editor > ESRI.ArcGIS.Editor > Interfaces > IE > IEditor Interface > IEditor.SelectionCount Property (ArcObjects .NET 10.4 SDK) |
The number of selected features which are editable.
[Visual Basic .NET] Public ReadOnly Property SelectionCount As Integer
[C#] public int SelectionCount {get;}
public void GetMapSelection()
{
//Get a reference to IApplication app in ICommand::OnCreate hook parameter.
IEditor sEditor=app.FindExtensionByName("ESRI Object Editor") as IEditor;
IEnumFeature enumFeature=sEditor.EditSelection;
enumFeature.Reset();
IFeature selFeature=enumFeature.Next();
for (int fCount=0; fCount < sEditor.SelectionCount; fCount++)
{
IGeometry selGeometry=selFeature.Shape;
'Code to do something with the geometry
System.Windows.Forms.MessageBox.Show(selGeometry.GeometryType);
selFeature=enumFeature.Next;
}
}