<?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 Re: Export to PNG by DDP Page Name instead of PageNum in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/export-to-png-by-ddp-page-name-instead-of-pagenum/m-p/165142#M12680</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Check out this &lt;/SPAN&gt;&lt;A href="http://forums.arcgis.com/threads/47429-export-data-driven-pages-to-mxd-with-file-name-by-page-name"&gt;thread&lt;/A&gt;&lt;SPAN&gt;. It should do what you want.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 27 Mar 2013 14:27:12 GMT</pubDate>
    <dc:creator>JeffMoulds</dc:creator>
    <dc:date>2013-03-27T14:27:12Z</dc:date>
    <item>
      <title>Export to PNG by DDP Page Name instead of PageNum</title>
      <link>https://community.esri.com/t5/python-questions/export-to-png-by-ddp-page-name-instead-of-pagenum/m-p/165141#M12679</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am surprised that this has not been documented previously, but my search did not yield any results.&amp;nbsp; Here's my question: There is sample code to export all of your data driven pages to individual PNG files with the page number at the end of the file name.&amp;nbsp; How do I change the code to create file names that use the page &lt;/SPAN&gt;&lt;SPAN style="text-decoration:underline;"&gt;name&lt;/SPAN&gt;&lt;SPAN&gt; index value instead of the page number?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here's the sample code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;mxd = arcpy.mapping.MapDocument("CURRENT")
... for pageNum in range(1, mxd.dataDrivenPages.pageCount + 1):
...&amp;nbsp;&amp;nbsp; mxd.dataDrivenPages.currentPageID = pageNum
...&amp;nbsp;&amp;nbsp; arcpy.mapping.ExportToPNG(mxd, r"C:\ArcGIS\Map_Area_" + str(pageNum) + ".png")
... del mxd&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Mar 2013 11:12:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/export-to-png-by-ddp-page-name-instead-of-pagenum/m-p/165141#M12679</guid>
      <dc:creator>SusanZwillinger</dc:creator>
      <dc:date>2013-03-27T11:12:06Z</dc:date>
    </item>
    <item>
      <title>Re: Export to PNG by DDP Page Name instead of PageNum</title>
      <link>https://community.esri.com/t5/python-questions/export-to-png-by-ddp-page-name-instead-of-pagenum/m-p/165142#M12680</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Check out this &lt;/SPAN&gt;&lt;A href="http://forums.arcgis.com/threads/47429-export-data-driven-pages-to-mxd-with-file-name-by-page-name"&gt;thread&lt;/A&gt;&lt;SPAN&gt;. It should do what you want.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Mar 2013 14:27:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/export-to-png-by-ddp-page-name-instead-of-pagenum/m-p/165142#M12680</guid>
      <dc:creator>JeffMoulds</dc:creator>
      <dc:date>2013-03-27T14:27:12Z</dc:date>
    </item>
  </channel>
</rss>

