Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

Is there an easy way to create a polygon that matches the data frame in my page layout? I'm trying to set up data driven pages and want to have it key off of polygons that frame the boundaries for each page. I would like to see them as polygons so that I can re-position as necessary and quickly visualize what will appear on each page.

share|improve this question

2 Answers 2

up vote 5 down vote accepted

I was wondering about the same but found that there is no such out-of-the-box tool.

I made an add-on for this. You can download it here: http://www.arcgis.com/home/item.html?id=a9b032f739254ebeb6221c9294ebc886

share|improve this answer
    
I figured it would probably require some coding and it looks like you've already done all the work. Thanks! It's exactly what I need. –  spencerrecneps Aug 13 '12 at 18:17
    
It says it was downloaded 17 times but I didn't receive any comments. Works pretty good for me but if you find any glitches let me know and I will correct it. –  Jakub Aug 13 '12 at 18:20

This is clearly too late for @spencerrecneps but may help someone else.

From the ArcGIS online help under the "Data Frame" class, DataFrame example 4 shows you how to do this:

The following script converts a data frame's extent object into a polygon feature so that it can be used with the SelectLayerByLocation_management function.

import arcpy
mxd = arcpy.mapping.MapDocument(r"C:\Project\Project.mxd")
df = arcpy.mapping.ListDataFrames(mxd, "Transportation")[0]
lyr = arcpy.mapping.ListLayers(mxd, "Accidents", df)[0]

#The DataFrame extent object is converted into a polygon feature so it can be used with the SelectLayerByLocation function.

dfAsFeature = arcpy.Polygon(arcpy.Array([df.extent.lowerLeft, df.extent.lowerRight, df.extent.upperRight, df.extent.upperLeft]),
                            df.spatialReference)
arcpy.SelectLayerByLocation_management(lyr, "INTERSECT", dfAsFeature, "", "NEW_SELECTION")

mxd.save()
del mxd
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.