Select to view content in your preferred language

List Selected Layers from ArcGIS Pro Map with ArcPy

700
2
Jump to solution
01-17-2024 01:29 AM
KenBragg
Occasional Contributor

Hi folks

Using ArcPy I would like to get a list of the selected layers from the contents of the active ArcGIS Pro Map.

I don't see a property or method for this on Layer nor on cim_layer returned by getDefinition on a layer object.

It seems it was previously possible with pythonaddins.

Any ideas appreciated

Thanks

0 Kudos
1 Solution

Accepted Solutions
BlakeTerhune
MVP Regular Contributor

I don't think this is possible.

ArcGIS Pro Get Active Layer - Esri Community

Maybe you can make a Python toolbox with a multivalue parameter and the user can select the layers there?

View solution in original post

0 Kudos
2 Replies
BlakeTerhune
MVP Regular Contributor

I don't think this is possible.

ArcGIS Pro Get Active Layer - Esri Community

Maybe you can make a Python toolbox with a multivalue parameter and the user can select the layers there?

0 Kudos
KenBragg
Occasional Contributor

Thanks, seems you must be right. 
Strange this isn't possible as there are lots of tools that work on "selected" layers but I guess these tools use other APIS.

0 Kudos