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(); } }
Les membres connectés peuvent publier, suivre les mises à jour, et plus encore. Nouveau ici ? Inscrivez-vous gratuitement.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.