Matching Rotation Between Data Frames When Using Data Driven Pages

120
2
03-13-2012 10:31 AM
Status: Open
AdamInglis
Occasional Contributor II
Please add the option to match the rotation of a non DDP data frame to a DDP data frame.  Currently you can set the extents of a non-DDP data frame to match a DDP data frame extents, but no the rotation.
 
2 Comments
ChrisFox
You can accomplish this with Python. Below is a sample script:

import arcpy
mxd = arcpy.mapping.MapDocument(r"C:\Project\ParcelAtlas.mxd")
ddpDF = arcpy.mapping.ListDataFrames(mxd, "DDPDataFrameName")[0] #Replace name of DDP Data Frame
otherDF = arcpy.mapping.ListDataFrames(mxd, "OtherDataFrameName")[0] #Replace name of Other Data Frame you want to rotate
for pageNum in range(1, mxd.dataDrivenPages.pageCount + 1):
    mxd.dataDrivenPages.currentPageID = pageNum
    otherDF.rotation = ddpDF.rotation
    arcpy.mapping.ExportToPDF(mxd, r"C:\Project\OutPut\ParcelAtlas_Page" + str(pageNum) + ".pdf")
del mxd
WillyLynch
THis is a nice work around but it would be useful to petroleum and mining users to have as COTS