I am currently attempting to port a tool from ArcGIS Desktop + ArcObjects to ArcGIS Pro. In ArcObjects, I was able to select a layer in the content view using the following code:
IMap map = ArcMap.Document.FocusMap;
IActiveView activeView = (IActiveView)map;
IContentsView contentsView = mxd.CurrentContentsView;
contentsView.SelectedItem = layer;
However, in ArcGIS Pro, I cannot find an equivalent functionality. Is there a corresponding feature available in ArcGIS Pro? I could not find it in the API reference.
Solved! Go to Solution.
Hi,
Yes, You can. MapView has method SelectLayers.
So, accept as solution