Create a polygon from data frame

07-02-2016 02:05 AM
Occasional Contributor III

I am hoping there is a simple way to create a polygon (feature class or shapefile) from the extent of the data frame in layout mode.

I know it is possible to view the bounding coordinates for the data frame and plot a polygon that way, however this is quite a laborious task which can be automated.

I discovered this tool

however when I install the Add-in I'm unable to see any new extensions or toolbars added. I am using version 10.2.2

0 Kudos
7 Replies
MVP Esteemed Contributor

I am not at a place to test this, but here are a few things to check or try when installing this or any addin.

  • Make sure it is in the correct software ArcMap v's ArcCatalog.  Typically they are built for one or the other, not both. I'm assuming that one is for Map and since it says 10.0 and above, it should work
  • Check the addin manager under...I extensions. 
  • Make sure the toolbar is turned on.
  • i found another way to add addins is to use the "customize"  (for adding toolbars etc.) selecting "add from file" at the bottom, and to point to the .addin file.  TIP: for those writing their own and updating->creating->testing, using this method prevent having to close/re-open the software for a refresh.
  • .addin files are just .zip files with a different extension.  Change .addin to .zip, unzip the file, and you should be able to access the toolbox and run it manually.  This is assuming there isn't some type of encryption, but typically the addin is just an easy way to package tools and toolbars wi all the dependencies.  So give that a try.

hope that helps.

Occasional Contributor III

Thank you, I was eventually able to figure out where I was going wrong.  I ensured the tool was installing to:


Turns out the tool was installing correctly, however I was looking for a new toolbar, and not an actual tool/command. Unfortunately there were no instructions telling me what to look for, however I found it here.


Only problem now is the tool crashes ArcMap whenever I click the button!

0 Kudos
MVP Esteemed Contributor

Hard to say what is causing the crash, but it's always good to try Resetting your ArcGIS application profile​  or log in as a different user to see if there is something that is flaky with your account.  That will at least eliminate those possible issues.

0 Kudos
Occasional Contributor

Use the Create Data Frame Polygon Tool.(Add-In).. Maybe turn off the Geo Referencing Tools if you have it open? Tool many tools maybe the problem and that tool causes some problems with memory cache.

0 Kudos
Occasional Contributor II

This one works for me

There's a version for 10.2 but I don't have a link for it.



MVP Honored Contributor

This is about the bare minimum required to make it happen via Python:

>>> mxd = arcpy.mapping.MapDocument("CURRENT") # map
... df = arcpy.mapping.ListDataFrames(mxd)[0] # get 1st data frame
... sr = df.spatialReference # get spatial reference
... ext = df.extent # extent object
... BL = arcpy.Point(ext.XMin,ext.YMin) # bottom left
... BR = arcpy.Point(ext.XMax,ext.YMin) # bottom right
... TR = arcpy.Point(ext.XMax,ext.YMax) # top right
... TL = arcpy.Point(ext.XMin,ext.YMax) # top left
... df_poly = arcpy.Polygon(arcpy.Array([[BL,BR,TR,TL,BL]]),sr) # create polygon
... arcpy.CopyFeatures_management(df_poly,r'in_memory\poly') # write to disk
New Contributor
0 Kudos