<?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 DDP export to rasters with page names? in Mapping Questions</title>
    <link>https://community.esri.com/t5/mapping-questions/ddp-export-to-rasters-with-page-names/m-p/177713#M1926</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have been using an arcpy script to export a view to a georeferenced tif, but the tifs come out as XXX1.tif, XXX2.tif, etc. where XXX is whatever text I put in the path and the number is the pageNum from the index file.&amp;nbsp; I'm probably missing something incredibly obvious but I can't find a way to have the output tifs include their individual DDP page names as happens with the standard export to pdf in a DDP.&amp;nbsp; Any suggestions?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If it makes it any easier here is the entire script which produces a series of tifs (and tfws) starting with currentName1.tif and ending at currentName19 in one particular case.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;import arcpy&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;... mxd = arcpy.mapping.MapDocument("Current")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;... df = arcpy.mapping.ListDataFrames(mxd)[0]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;... ar = df.extent.height / df.extent.width&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;... for pageNum in range(1, mxd.dataDrivenPages.pageCount + 1):&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;...&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mxd.dataDrivenPages.currentPageID = pageNum&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;...&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print "Exporting page {0} of {1}".format(str(mxd.dataDrivenPages.currentPageID), str(mxd.dataDrivenPages.pageCount))&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;...&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.mapping.ExportToTIFF(mxd,r"C:\Project\currentName" + str(pageNum) + ".tif",df,9306,9306*ar,300,True)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;... del mxd&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 20 Jul 2012 19:14:03 GMT</pubDate>
    <dc:creator>JohnSobetzer</dc:creator>
    <dc:date>2012-07-20T19:14:03Z</dc:date>
    <item>
      <title>DDP export to rasters with page names?</title>
      <link>https://community.esri.com/t5/mapping-questions/ddp-export-to-rasters-with-page-names/m-p/177713#M1926</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have been using an arcpy script to export a view to a georeferenced tif, but the tifs come out as XXX1.tif, XXX2.tif, etc. where XXX is whatever text I put in the path and the number is the pageNum from the index file.&amp;nbsp; I'm probably missing something incredibly obvious but I can't find a way to have the output tifs include their individual DDP page names as happens with the standard export to pdf in a DDP.&amp;nbsp; Any suggestions?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If it makes it any easier here is the entire script which produces a series of tifs (and tfws) starting with currentName1.tif and ending at currentName19 in one particular case.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;import arcpy&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;... mxd = arcpy.mapping.MapDocument("Current")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;... df = arcpy.mapping.ListDataFrames(mxd)[0]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;... ar = df.extent.height / df.extent.width&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;... for pageNum in range(1, mxd.dataDrivenPages.pageCount + 1):&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;...&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mxd.dataDrivenPages.currentPageID = pageNum&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;...&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print "Exporting page {0} of {1}".format(str(mxd.dataDrivenPages.currentPageID), str(mxd.dataDrivenPages.pageCount))&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;...&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.mapping.ExportToTIFF(mxd,r"C:\Project\currentName" + str(pageNum) + ".tif",df,9306,9306*ar,300,True)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;... del mxd&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Jul 2012 19:14:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/mapping-questions/ddp-export-to-rasters-with-page-names/m-p/177713#M1926</guid>
      <dc:creator>JohnSobetzer</dc:creator>
      <dc:date>2012-07-20T19:14:03Z</dc:date>
    </item>
    <item>
      <title>Re: DDP export to rasters with page names?</title>
      <link>https://community.esri.com/t5/mapping-questions/ddp-export-to-rasters-with-page-names/m-p/177714#M1927</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Have you tried something like:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;&amp;gt;&amp;gt;&amp;gt;&amp;nbsp; mxd = arcpy.mapping.MapDocument("Current") ddp = mxd.dataDrivenPages df = arcpy.mapping.ListDataFrames(mxd)[0] for pageNum in range(1, mxd.dataDrivenPages.pageCount + 1): &amp;nbsp;&amp;nbsp;&amp;nbsp; mxd.dataDrivenPages.currentPageID = pageNum &amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.mapping.ExportToTIFF(mxd,r"C:\Temp\\" + str(ddp.pageRow.Name) + ".tif", df)&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Where the "Name" pageRow.Name is the name of the field in the index layer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Jeff&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Aug 2012 19:06:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/mapping-questions/ddp-export-to-rasters-with-page-names/m-p/177714#M1927</guid>
      <dc:creator>JeffBarrette</dc:creator>
      <dc:date>2012-08-06T19:06:07Z</dc:date>
    </item>
    <item>
      <title>Re: DDP export to rasters with page names?</title>
      <link>https://community.esri.com/t5/mapping-questions/ddp-export-to-rasters-with-page-names/m-p/177715#M1928</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thank you very much Jeff.&amp;nbsp; It's just what I needed.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I figured it had to be simple but I don't know python beyond mixing samples I can find. This one stumped me and I found a workaround right after posting so I let it go.&amp;nbsp; The workaround, however, is a clumsy one to set up (it uses a batch file renamer and a text file with input and output names) so this is so much better.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is my current script to produce a properly georeferenced set of tifs from the same project I use for pdfs, showing a generic path of C:\Project for the output.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;import arcpy&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;... mxd = arcpy.mapping.MapDocument("Current")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;... ddp = mxd.dataDrivenPages&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;... df = arcpy.mapping.ListDataFrames(mxd)[0]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;... ar = df.extent.height / df.extent.width&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;... for pageNum in range(1, mxd.dataDrivenPages.pageCount + 1):&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;...&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mxd.dataDrivenPages.currentPageID = pageNum&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;...&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print "Exporting page {0} of {1}".format(str(mxd.dataDrivenPages.currentPageID), str(mxd.dataDrivenPages.pageCount))&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;...&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.mapping.ExportToTIFF(mxd,r"C:\Project\ctype12_" + str(ddp.pageRow.Name) + ".tif",df,9306,9306*ar,300,True)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;... del mxd&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Aug 2012 13:15:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/mapping-questions/ddp-export-to-rasters-with-page-names/m-p/177715#M1928</guid>
      <dc:creator>JohnSobetzer</dc:creator>
      <dc:date>2012-08-07T13:15:45Z</dc:date>
    </item>
    <item>
      <title>Re: DDP export to rasters with page names?</title>
      <link>https://community.esri.com/t5/mapping-questions/ddp-export-to-rasters-with-page-names/m-p/177716#M1929</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thank you for this. It works perfectly and is exactly what I needed!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Oct 2012 03:20:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/mapping-questions/ddp-export-to-rasters-with-page-names/m-p/177716#M1929</guid>
      <dc:creator>George_ChandeepCorea</dc:creator>
      <dc:date>2012-10-18T03:20:34Z</dc:date>
    </item>
    <item>
      <title>Re: DDP export to rasters with page names?</title>
      <link>https://community.esri.com/t5/mapping-questions/ddp-export-to-rasters-with-page-names/m-p/177717#M1930</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Have you tried something like:&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
&amp;gt;&amp;gt;&amp;gt; 
mxd = arcpy.mapping.MapDocument("Current")
ddp = mxd.dataDrivenPages
df = arcpy.mapping.ListDataFrames(mxd)[0]
for pageNum in range(1, mxd.dataDrivenPages.pageCount + 1):
&amp;nbsp;&amp;nbsp;&amp;nbsp; mxd.dataDrivenPages.currentPageID = pageNum
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.mapping.ExportToTIFF(mxd,r"C:\Temp\\" + str(ddp.pageRow.Name) + ".tif", df)
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;Where the "Name" pageRow.Name is the name of the field in the index layer.&lt;BR /&gt;&lt;BR /&gt;Jeff&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;This works great for letting me name my files as I need to but it doesn't export the entire layout view of the mxd. Any idea what code is needed to export the layout view?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Chris&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 09:07:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/mapping-questions/ddp-export-to-rasters-with-page-names/m-p/177717#M1930</guid>
      <dc:creator>ChristopherDean</dc:creator>
      <dc:date>2021-12-11T09:07:51Z</dc:date>
    </item>
    <item>
      <title>Re: DDP export to rasters with page names?</title>
      <link>https://community.esri.com/t5/mapping-questions/ddp-export-to-rasters-with-page-names/m-p/177718#M1931</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Found the answer in this thread: &lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://forums.arcgis.com/threads/80836-exporting-layout-view-in-arcpy"&gt;http://forums.arcgis.com/threads/80836-exporting-layout-view-in-arcpy&lt;/A&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;replaced df with data_frame = "PAGE_LAYOUT"&amp;nbsp; and then df with data_frame and it exported the layout view correctly.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Chris&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Oct 2013 12:46:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/mapping-questions/ddp-export-to-rasters-with-page-names/m-p/177718#M1931</guid>
      <dc:creator>ChristopherDean</dc:creator>
      <dc:date>2013-10-01T12:46:22Z</dc:date>
    </item>
  </channel>
</rss>

