Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have been playing with the new map book functionality in ArcGIS 10 to re-create maps I have made in the past. The new Data Driven maps with page queries is a pretty powerful tool.

Is there a way to match the rotation of inset map, secondary data frame, with the main layer being used for the data driven maps? I found it is possible to match the extent in the 'Data Frame' tab of the 'Data Frame Properties', is this also the place to find the rotation option?

If this is something that you need to code, is it possible to build it into the mxd and to have it launch on refresh?

Not sure I understand how Python is supposed to work within a mxd.

Thanks for your time,


share|improve this question
So is there a way to write a python script that can do this with the new arcpy.mapping?? – GuidoS Dec 16 '10 at 21:00
up vote 2 down vote accepted

For 2 Data frames to be rotated in sync can be done if you set a field with rotation value

you can sync inset maps with arcmap bookmarks and the 'extent indicators'

Note: Bookmarks are stored in .mxds however 'My Places' do not (separate file .dat)

share|improve this answer
I do not have access to the MPS tools that the help system link you created refer to. I am using the data driven pages tools recommended by ESRI in ArcGIS10. – GuidoS Dec 9 '10 at 16:37
You can do it in VBA… – Mapperz Dec 9 '10 at 16:53

I was able to match the rotation of a Data Driven Page data frame to a secondary data frame using this python script:

import arcpy
mxd = arcpy.mapping.MapDocument("CURRENT")
topDF = arcpy.mapping.ListDataFrames(mxd, "Top")[0]
bottomDF = arcpy.mapping.ListDataFrames(mxd, "Bottom")[0]

for DDP_Page in range(1, (mxd.dataDrivenPages.pageCount + 1)):
    mxd.dataDrivenPages.currentPageID = DDP_Page
    angle = mxd.dataDrivenPages.pageRow.angle 
    bottomDF.rotation = angle
    arcpy.mapping.ExportToPDF(mxd, r"C:\project\PDFs\Map_Book_Page_" + str(DDP_Page) + ".pdf")

I paste the above script into the python window in ArcMap with the DDP MXD open. It iterates through each page, sets the rotation of the bottom data frame to match the rotation of the top data frame (which is controlled by DDP). I was not able to figure out how to prevent the script from overwriting the rotation setting at the bottom frame with every iteration, but my work around was to export out the PDF within the FOR loop. Any suggestions as to how to improve the script would be greatly appreciated.



share|improve this answer

I think maybe I am missing something in your question. Do you want to automatically sync the inset and the map frame?

If not then when you turn on the data frame tools toolbar you will see a rotation pick. You would just set the inset active and rotate it the same as your main data frame.

share|improve this answer
I am working with the new datya driven pages, so each map is setup using the data driven pages information, and for the main layer the rotation is also set. – GuidoS Dec 9 '10 at 16:32
I see so many pages would be difficult to apply that to. – Brad Nesom Dec 9 '10 at 16:57

The functionality of Data Driven Pages seems to be streached by your request. This seems to go back to the simplicity of the environment. Data Driven Pages is a way of creating a simple Map Series in Core ArcGIS and is replacing the functionality of DS Mapbook which is an unsupport developer sample.

I am unsure if this is possible but I do know that it is possible in Production Mapping using the Data Frame Manager, and the Synchronization options held. Another software purchase may not be available to you but just letting you know the functionality exists

Have Fun, CDB

share|improve this answer

Your Answer


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.