Modify Extent Indicator Using Arcpy?

358
2
Jump to solution
08-21-2020 06:48 AM
MarkBinder
Occasional Contributor

Is it possible to modify extent indicators in a map frame using arcpy? I have a map series with and some of the maps have insets with extent indicators; I would like to be able to turn on/off the inset maps and extent indicators when I export the maps to pdfs. 

In the ArcGIS Pro Contents pane the extent indicators show up under the map frame element but when I access the map frame element in Python there doesn't seem to be any options for the extent indicators. 

Thanks, 

Mark

0 Kudos
1 Solution

Accepted Solutions
JoshuaSharp-Heward
Occasional Contributor

Hi Mark,

You should be able to do this by using Python CIM access Python CIM access—ArcGIS Pro | Documentation . You can get the layout definition using layout.getDefinition() (see here: Layout—ArcGIS Pro | Documentation), make your tweaks and then update the layout definition with layout.setDefinition(newdefinition). Extent indicators are associated with CIMMapFrame elements in "extendIndicators", and have an "isVisible" attribute that you can switch from "true" to "false" to turn them off.

View solution in original post

0 Kudos
2 Replies
JoshuaSharp-Heward
Occasional Contributor

Hi Mark,

You should be able to do this by using Python CIM access Python CIM access—ArcGIS Pro | Documentation . You can get the layout definition using layout.getDefinition() (see here: Layout—ArcGIS Pro | Documentation), make your tweaks and then update the layout definition with layout.setDefinition(newdefinition). Extent indicators are associated with CIMMapFrame elements in "extendIndicators", and have an "isVisible" attribute that you can switch from "true" to "false" to turn them off.

0 Kudos
MarkBinder
Occasional Contributor

Thanks! I knew there was a way to do it; just forgot it was called CIM access. I am now able to turn the extents on/off in a Python script.