Frequently asked question

Is there an event triggered when the user changes or selects a layer in ArcMap's TOC?

Last Published: April 25, 2020


No. There is currently no outbound interface that supports this event.

As a workaround, use a Timer Control to call IMxDocument::SelectedLayer on the MxDocument CoClass. Alternatively, call IMxDocument::SelectedLayer from the Enabled property of an ICommand.
ICommand::Enabled gets hit often and can be used, with caution, for code that must run frequently.

Article ID:000005021

  • 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