How to frame data driven pages

3070
6
03-15-2016 09:24 AM
JamesBoggs
New Contributor II

The extent of my data driven pages are setup based on a data driven scale attribute. This frames most of my maps well when I batch export them to PDF files. But a few are cut off by the frame. The set scale will fit in the frame; it just needs to be manually panned to fit. It’s only a few pages giving me problems, so I could just go to the problem pages, use the pan tool to adjust the map and export it again. When I do this, the export shows the default position in the frame, not the position that I panned to.

How can I ensure my maps are in frame when batch exporting? How does it determine how to frame your map when you use a data driven scale attribute? There doesn’t seem to be a way to use both “Best Fit” and “Data Driven Scale” which would be ideal.

Why when I manually pan the map in my frame, does it not export the panned position?

I have attached some photos of the issue and also my page settings.

0 Kudos
6 Replies
DanaNolan
Regular Contributor

Exporting a page causes all DDPs to refresh, which includes centering on the index feature, so you cannot correct extent problems that way. You can save your MXD, disable DDP, and export, then add the problem pages into your PDF.

Can you edit the index feature? Or copy it and then edit the copy? If so, just edit the index feature so it pulls in what you want extent-wise. Make it fill the area that is being cut off.

0 Kudos
JamesBoggs
New Contributor II

Thank you for responding. I tried your suggestion of disabling the DDP, but that only presents a new problem. Much of the text is dynamic, so when I disable DDP it shows all dynamic text fields as [empty]. I’m assuming there is no way to correct this without having to manually re-type all of the text for each export? The text would be different for each map I am exporting.

I tried adjusting the extent using the three methods highlighted in the attached image, but still, it exported the default. Is there another method or am I misunderstanding what you mean by editing the index feature so it pulls in what I want extent-wise?

Thank you.

Extent.jpg

0 Kudos
DanaNolan
Regular Contributor

For example, I had some clusters of buildings, buffered and dissolved by location name, as an index feature. The location name was the focus of each map page.

In some areas,  peripheral buildings did not match to this location name or trails that seemed important to show were being cut off,  but I did not want to increase padding around the other pages by making changes to all the pages.

I simply made the buffers visible, then

moved some of the vertices of the problem buffers so the extents would pick up what I wanted; I left the other buffers alone.

0 Kudos
JamesBoggs
New Contributor II

Okay, I think I understand what you mean and can see how that would help in some situations. I don't think that would apply to my situation though. I have a seamless layer of Parcels. I have another layer of Maps. Each Map is a polygon overlapping several Parcels, the Map layer is the focus of each page, so it shows all the parcels on that map while hiding the parcels not overlapped by the Map polygon. If I would change the vertices on the Map polygon to be in the extent of my frame it would hide some of the Parcels that I need to show...I hope that makes sense.

In any case, my solution for now is to simply change the scale attribute. I was trying to stick to standard scales 1:2400, 1:4800, 1:9600 etc. But a few being a slightly odd scale shouldn't be that big of a deal.

Thanks.

0 Kudos
DarrenWiens2
MVP Honored Contributor

Here's a quick Python script that will export the DDP page extents. Just copy and paste into the Python window within the mxd. It will create a temporary layer called 'polys', which you could export to disk and use directly as the index layer.:

>>> polys = []

... mxd = arcpy.mapping.MapDocument("CURRENT")

... df = arcpy.mapping.ListDataFrames(mxd)[0]

... for pageNum in range(1, mxd.dataDrivenPages.pageCount + 1):

...    mxd.dataDrivenPages.currentPageID = pageNum

...    extent = df.extent

...    polys.append(arcpy.Polygon(arcpy.Array([

...        arcpy.Point(extent.XMax,extent.YMax),

...        arcpy.Point(extent.XMax,extent.YMin),

...        arcpy.Point(extent.XMin,extent.YMin),

...        arcpy.Point(extent.XMin,extent.YMax),

...        arcpy.Point(extent.XMax,extent.YMax)

...    ])))

... arcpy.CopyFeatures_management(polys,r'in_memory\polys')

note: this will only work if the DDP pages are not rotated.

JamesBoggs
New Contributor II

I'm not sure this would work since most of my pages are rotated based on an attribute field. I did try running it, but it seemed like it was going to take a while since I have about 500 pages. When I left my desk and came back, ArcMap had crashed. Thank you for the response though.

0 Kudos