How can I get the current maps extent with configured mapUnits?
Two examples always return the unit of the map projection (Meters) instead of the configured mapUnits (degrees).
av = aprx.listMaps('Map')[0]
print(av.name)
av.mapUnits
Result: 'Meter'
from arcpy import mp
aprx = mp.ArcGISProject("CURRENT")
currentExtent = aprx.activeView.camera.getExtent()
print(currentExtent)
Result:
2697655.50805199 1234784.44214015 2703943.289983 1243768.44124222 NaN NaN NaN NaN
Screenshot of my ArcGIS Pro and the Notebook:
You might not be able to directly from the cim but you can use projectAs in the extent class
Extent—ArcGIS Pro | Documentation
to convert from the existing extent with its spatial reference (PCS) to a new spatial reference (GCS)
Dan's suggestion is a good one. You could also log an idea for getting the display units from the map, which differ from the map units.