AnsweredAssumed Answered

Zoom map to the extent of a layer in (ArcGIS Pro Project)

Question asked by james_taylor-esristaff Employee on May 2, 2017
Latest reply on Dec 21, 2018 by arobey

I'm writing code to create new ArcGIS Pro Projects using the Pro arcpy  (package


Doing something like this:


aprx ="C:\temp\Empty.aprx")
map = aprx.listMaps()[0]"C:\Users\xxxxxx\Documents\Test1\Orthomosaic.tif")


But I can't figure out to zoom the map to the extent of Orthomosaic.tif (or any other extent for that matter).


From the docs at   Alphabetical list of classes—ArcPy | ArcGIS Desktop 

I can see that a MapFrame has a zoomToAllLayers method, but a MapFrame is only available on a Layout element.


Anyone know how to do this?