AnsweredAssumed Answered

How do I set an MXD's full extent programmatically using arcpy?

Question asked by geoerickson on Jul 9, 2014
Latest reply on Jun 23, 2015 by fprallyesrifrance-fr-esridist

I am using arcpy for 10.2 and am able to set the initial extent of the map using the dataframe's extent property. This is the initial extent that the map comes up at when the MXD is loaded.


How do I set the full extent programmatically using arcpy?

This article describes how to do it in ArcGIS Desktop 10.2: ArcGIS Help (10.2, 10.2.1, and 10.2.2)

Also, the full extent shows up right next to the initial extent in ArcGIS Server when an mxd is published as a service. It feels like the setting is so close yet I have spent far too much time trying to decipher ESRI help articles to figure this out.


To be clear again:

Initial Extent: initial zoomed area when an mxd is opened up and a map documents dataframes extent value:


df = arcpy.mapping.ListDataFrames(mxd)[0]

newExtent = df.extent


Full Extent: area that is zoomed to by clicking the Full Extent(globe icon) button in ArcGIS Desktop 10.


Thanks for any help.