The 2 immediate issues I see is that 1) you don't have [0]'s after your list functions and 2) you have a for loop but no indentation.import arcpy mxd = arcpy.mapping.MapDocument("My_MAP") mainDF = arcpy.mapping.ListDataFrames(mxd, "DFA")[0] locatorDF = arcpy.mapping.ListDataFrames(mxd, "DFB")[0] for DDP_Page in range(1, mxd.dataDrivenPages.pageCount + 1): mxd.dataDrivenPages.currentPageID = DDP_Page Rotate = mxd.dataDrivenPages.pageRow.Rotate #where Rotate is the name of the field in the attribute with the rotation values locatorDF.rotation = Rotate
Another way to do this is to get the rotation property value from one DF and apply to the other. For example,locatorDF.rotation = mainDF.rotation
You are not exporting or saving so your current code won't show immediate results.There is an enhancement request on "link to another data frame's extent" to automatically include rotation. Jeff