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 http://www.arcgis.com/home/item.html?id=0dcb445291bf461bb573b1504c170e0c
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
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.
hope that helps.
Thank you, I was eventually able to figure out where I was going wrong. I ensured the tool was installing to:
C:\Users\<username>\Documents\ArcGIS\AddIns\Desktop10.2.
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!
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.
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.
This one works for me http://www.arcgis.com/home/item.html?id=a9b032f739254ebeb6221c9294ebc886
There's a version for 10.2 but I don't have a link for it.
Cheers!
Mike
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
Hi, you can see this tool: https://www.arcgis.com/home/item.html?id=a9b032f739254ebeb6221c9294ebc886