HOW TO

Programmatically display selected features in ArcMap

Last Published: April 25, 2020

Summary

If you are using VBA to select features in ArcMap, the code in this article will allow you to display those features.

Procedure



Use IFeatureSelection::SelectionSet on your selection set.

Code:
Dim pFSelection as IFeatureSelection
Set pFSelection = pFeatureLayer

Set pFSelection.SelectionSet = MySelectionSet
pFSelection.SelectionChanged

Dim pAV As IActiveView
Set pAV = pDoc.FocusMap
pAV.ScreenDisplay.Invalidate Nothing, True, pAV.ScreenCacheID(esriViewGeoSelection, Nothing)

Article ID:000004882

Software:
  • ArcMap 8 x

Receive notifications and find solutions for new or common issues

Get summarized answers and video solutions from our new AI chatbot.

Download the Esri Support App

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options