<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic ArcPy Data Driven Page Extents (2 data frames) in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/arcpy-data-driven-page-extents-2-data-frames/m-p/747980#M57835</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have an MXD with two data frames. I want to use Data Driven Pages (DDP) to export this to PDF but have the second of the data frames be one extent ahead. I have the following script to export the two frames with the same extent using DDP. I want to have frame2 be one ahead of the DDP page of the master frame. Any ideas?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#set map document&lt;BR /&gt;mxd = arcpy.mapping.MapDocument("CURRENT")&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;#set master data frame - dataframe with DDP already applied&lt;BR /&gt;masterFrame = arcpy.mapping.ListDataFrames(mxd)&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;#set second data frame to copy master&lt;BR /&gt;frame2 = arcpy.mapping.ListDataFrames(mxd,"New Data Frame")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#for loop to process DDP using number of pages&lt;BR /&gt;for pageNum in range(1, mxd.dataDrivenPages.pageCount + 1):&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;#mxd.dataDrivenPages.currentPageID = pageNum&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;frame2[0].extent = masterFrame[0].extent&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;arcpy.mapping.ExportToPDF(mxd, r"C:\Users\user\Desktop\a\"+ str(pageNum) + '.pdf')&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 13 Feb 2019 15:28:37 GMT</pubDate>
    <dc:creator>EricSmith1</dc:creator>
    <dc:date>2019-02-13T15:28:37Z</dc:date>
    <item>
      <title>ArcPy Data Driven Page Extents (2 data frames)</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-data-driven-page-extents-2-data-frames/m-p/747980#M57835</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have an MXD with two data frames. I want to use Data Driven Pages (DDP) to export this to PDF but have the second of the data frames be one extent ahead. I have the following script to export the two frames with the same extent using DDP. I want to have frame2 be one ahead of the DDP page of the master frame. Any ideas?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#set map document&lt;BR /&gt;mxd = arcpy.mapping.MapDocument("CURRENT")&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;#set master data frame - dataframe with DDP already applied&lt;BR /&gt;masterFrame = arcpy.mapping.ListDataFrames(mxd)&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;#set second data frame to copy master&lt;BR /&gt;frame2 = arcpy.mapping.ListDataFrames(mxd,"New Data Frame")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#for loop to process DDP using number of pages&lt;BR /&gt;for pageNum in range(1, mxd.dataDrivenPages.pageCount + 1):&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;#mxd.dataDrivenPages.currentPageID = pageNum&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;frame2[0].extent = masterFrame[0].extent&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;arcpy.mapping.ExportToPDF(mxd, r"C:\Users\user\Desktop\a\"+ str(pageNum) + '.pdf')&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Feb 2019 15:28:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-data-driven-page-extents-2-data-frames/m-p/747980#M57835</guid>
      <dc:creator>EricSmith1</dc:creator>
      <dc:date>2019-02-13T15:28:37Z</dc:date>
    </item>
  </channel>
</rss>

