Skip to content

Instantly share code, notes, and snippets.

@sofferm
Created March 8, 2017 08:29
Show Gist options
  • Save sofferm/f0d375e25d218987338b6650f9448365 to your computer and use it in GitHub Desktop.
Save sofferm/f0d375e25d218987338b6650f9448365 to your computer and use it in GitHub Desktop.
Get Current Extent in ArcMap
arcpy.mapping.ListDataFrames(arcpy.mapping.MapDocument("CURRENT"))[0].extent.JSON
@sofferm
Copy link
Author

sofferm commented Mar 8, 2017

Output in python window:
u'{"xmin":831139.62034240551,"ymin":5389184.906793993,"xmax":831760.33408383303,"ymax":5389714.3391028568,"spatialReference":{"wkid":25832,"latestWkid":25832}}'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment