IGraphicsContainerSelect graphicsContainerSelect = mapControl.ActiveView.FocusMap as IGraphicsContainerSelect; if ( graphicsContainerSelect.ElementSelectionCount != 0 ) { IEnumElement enumElement = graphicsContainerSelect.SelectedElements; selectedElement = enumElement.Next(); // if you only want one of the selections you can stop here. // if you need more: while (selectedElement != null) { // do something with the current selectedElement, and then: selectedElement = enumElement.Next(); } }
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.