How to apply data driven pages rotation to multiple data frames

2735
3
12-10-2010 02:04 AM
GuidoStein
New Contributor III
I am trying to create a map with a local indicator. The main data layer is assigned a rotation from a field, using data driven pages. I would like the inset map rotation to match the main layer which is being adjusted using data driven pages.

Any ideas?
Tags (2)
0 Kudos
3 Replies
HelgeAstad
New Contributor III
In my setup I want all the frames to have the same extent and rotation. So I have one data frame with data driven pages, and the others have an extent setting derived from that frame.
( Data frame properties->data frame tab->extent(Other data frame))
0 Kudos
JeffBarrette
Esri Regular Contributor
This can be accomplished using arcy map scripting.  Arcpy.mapping works with data driven pages.  Here is a very simple example.

import arcpy
mxd = arcpy.mapping.MapDocument("path to DDP mxd")
mainDF = arcpy.mapping.ListDataFrames(mxd, "Main Data Frame")[0]
locatorDF = arcpy.mapping.ListDataFrames(mxd, "Locator Data Frame")[0]

for DDP_Page in range(1, mxd.dataDrivenPages.pageCount + 1)
>>mxd.dataDrivenPages.currentPageID = DDP_Page
>>scale = mxd.dataDrivenPages.pageRow.scale 
>>locatorDF.rotation = scale

Then do something like export to PDF.


Note: the ">> are spaces because the forum posts strip away leading spaces.

Here is a DDP / arcpy.mapping help topic:
http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/DataDrivenPages/00s300000030000000/
0 Kudos
AdhimoolamD
New Contributor
Hi jbarrette

I my case, the MXD having multiple Dataframe, the objective are
          1. to check the MXD has Enabled DDP
          2. If so, Find which DataFrame has been used to create the DDP.

Let me know how can i achieve this using Py scripts or ArcObject.

Regards
Adhi.
0 Kudos