Contents
Which is the desired extent of ArcMap for MXD?
This is the extent rendered by ArcMap when loading the final saved MXD. Desired MXD Extent: [1461338.0, 6811715.394055312, 1471338.0, 6817544.605944688] # Desired extent values. Updated Extent: 1461338.0 6811708.82692 1471338.0 6817550.17308 # Data frame extent values according to ArcPy after being updated (values are correct).
When to use the ArcPy method on a map?
Calling the ArcPy method ‘getExtent’ on a map layer returns the layer extents expressed in the units of the data frame’s coordinate system. However, it might be necessary to obtain the layer extents in the unit of the layer’s coordinate system.
How to check the global extent of MXD?
Extent check 2: 1213148.14815 6688750.0 1636851.85185 6936250.0 # Extent of the initial MXD data frame after adding desired layers (a global extent to cover all layers). This is the extent rendered by ArcMap when loading the final saved MXD. Desired MXD Extent: [1461338.0, 6811715.394055312, 1471338.0, 6817544.605944688] # Desired extent values.
What are the data frame extent values in ArcPy?
Updated Extent: 1461338.0 6811708.82692 1471338.0 6817550.17308 # Data frame extent values according to ArcPy after being updated (values are correct). Final extent within ArcMap 10.4.1:
Why is the extent not being set in ArcPy?
What is really confusing is that I have added a few print statements within the code to check the extent values before and after being set, and these are all returning the correct values (i.e. according to ArcPy, the extent is being set correctly).
When does the new extent save in MXD?
At present, the new extent is not saving within the MXD document, instead rendering a ‘global’ extent when the final MXD document is loaded within ArcMap (the extent is large enough to encompass all layers).
Is there a python script to update ArcMap?
I am currently working on a Python script (v2.7) to automatically update/adjust an ArcMap (v10.4.1) MXD file, including adding several layers and adjusting the data frame extent.