// My selection of features IFeatureSelection plantSelection = infosXML.LayerPlant as IFeatureSelection; // Load of code ... // Clear the selection plantSelection.Clear(); // Refresh the screen ArcMap.Document.ActiveView.Refresh();
You're calling Refresh on the document's active view. If the document is in Layout view then this will refresh the layout and not the map inside of the map frame. If the document is in Data view then this will refresh the map in the table of contents that is currently active. If you are calling this code while in Data view and the map that contains the layer is active then this should work. Otherwise, you will need to get the appropriate active view reference before calling Refresh.
IActiveView activeView = ArcMap.Document.FocusMap as IActiveView; activeView.Refresh();
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.