Select to view content in your preferred language

Extent of map in ArcGIS PRO

8067
10
Jump to solution
03-06-2018 04:39 PM
DavidMatthews3
Occasional Contributor

In the transition from arcpy.mapping to arcpy.mp there doesn't seem to be a way to get the extent (in order to calculate the center)  of the current map.The camera extent only applies to layouts and MapFrames.

Does anyone know how to get around this?

Something like

aprx=arcpy.mp.ArcGISProject("CURRENT")
mapView = aprx.listMaps()[0]
extent = mapView.extent

Is this possible in pro?

Tags (2)
10 Replies
ToyotaT18
Regular Contributor

I was looking for similar, thought I'd post the answer here in case anyone else was looking.

You can use aprx.activeView.camera.getExtent()