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

9137
10
Jump to solution
07-09-2014 06:26 AM
NeilErickson
New Contributor II

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:

Example:

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.

0 Kudos
10 Replies
FrédéricPRALLY
Esri Contributor

Hi Dan,

I mean thread of course !

Sorry for my bad english,

Have a great day,

Fred