<?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: Data Driven Pages and python in Geoprocessing Questions</title>
    <link>https://community.esri.com/t5/geoprocessing-questions/data-driven-pages-and-python/m-p/643416#M21453</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Ryan,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;try adding this to your script&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
# Get the value from the field called tilename, e.g. ab1234. (This should be a string field)
&amp;nbsp; name = row.getValue("TILE_NAME")

&amp;nbsp; # Set Output location
&amp;nbsp; outputlocation = arcpy.GetParameterAsText(0)
&amp;nbsp; 
&amp;nbsp; # Concatenate into whole path name
&amp;nbsp; outputName = outputlocation + "\\" + name + "_ArcMap" + ".tif"&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've just extracted this from a longer bit of code I posted here&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://forums.arcgis.com/threads/89608-python-script-zoom-to-each-county-in-a-state-shp-and-export-a-pdf-map" rel="nofollow noopener noreferrer" target="_blank"&gt;http://forums.arcgis.com/threads/89608-python-script-zoom-to-each-county-in-a-state-shp-and-export-a-pdf-map&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Dan&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 12 Dec 2021 03:20:22 GMT</pubDate>
    <dc:creator>DanielHall_Ballester</dc:creator>
    <dc:date>2021-12-12T03:20:22Z</dc:date>
    <item>
      <title>Data Driven Pages and python</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/data-driven-pages-and-python/m-p/643412#M21449</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am attempting to export a set of maps using python and data driven pages.&amp;nbsp; I have been successful in getting the code to work but I am struggling with the file naming of the exported JPEG's.&amp;nbsp; I need to the file names to coincide with a field in the attribute table.&amp;nbsp; Basically I am making a set of parcel maps, and need the file name to be the parcel number (PARCEL_NO).&amp;nbsp; Here is the code I am using.&amp;nbsp; I am a novice when it comes to this stuff so please be patient.&amp;nbsp; Thanks in advance!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;mxd = arcpy.mapping.MapDocument("CURRENT")&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; mxd.dataDrivenPages.currentPageID = pageNum&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; arcpy.mapping.ExportToJPEG(mxd, r"P:\Township Maps\Bloomingdale\JPEG" + str(pagename) + ".jpeg")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;del mxd&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Apr 2013 13:18:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/data-driven-pages-and-python/m-p/643412#M21449</guid>
      <dc:creator>RyanMiller</dc:creator>
      <dc:date>2013-04-05T13:18:11Z</dc:date>
    </item>
    <item>
      <title>Re: Data Driven Pages and python</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/data-driven-pages-and-python/m-p/643413#M21450</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I dont think you have 'pagename' defined anywhere. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I think you want to getPageIDFromName&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//00s300000030000000"&gt;http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//00s300000030000000&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I do something that's probably unconventional. I have an element in my MXD which is a dynamic text from DDP (the Page name), and then i define that element as a parameter in my model. I can then reference that parameter later when I go to name and export the PDF.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Also, in the future, you may have better luck in the Map Automation forum.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Apr 2013 14:47:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/data-driven-pages-and-python/m-p/643413#M21450</guid>
      <dc:creator>ZacharyHart</dc:creator>
      <dc:date>2013-04-05T14:47:42Z</dc:date>
    </item>
    <item>
      <title>Re: Data Driven Pages and python</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/data-driven-pages-and-python/m-p/643414#M21451</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Ryan,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Are you getting a specifc error with your code?&amp;nbsp; What is the current code actually doing when ran?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Matt&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Apr 2013 16:46:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/data-driven-pages-and-python/m-p/643414#M21451</guid>
      <dc:creator>MatthewPayne</dc:creator>
      <dc:date>2013-04-05T16:46:06Z</dc:date>
    </item>
    <item>
      <title>Re: Data Driven Pages and python</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/data-driven-pages-and-python/m-p/643415#M21452</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm running a similar script where I defined:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;ddp = mxd.dataDrivenPages&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;then ran something similar to this (changed for your code):&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.mapping.ExportToJPEG(mxd, r"P:\Township Maps\Bloomingdale\JPEG" + ddp.pageRow.pagename + ".jpeg")&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is assuming that "pagename" is the field in the attribute table that you are trying to use to label. I'm pretty new to python myself though so there may be an easier way.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Jul 2013 18:56:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/data-driven-pages-and-python/m-p/643415#M21452</guid>
      <dc:creator>ChrisWitt1</dc:creator>
      <dc:date>2013-07-30T18:56:53Z</dc:date>
    </item>
    <item>
      <title>Re: Data Driven Pages and python</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/data-driven-pages-and-python/m-p/643416#M21453</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Ryan,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;try adding this to your script&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
# Get the value from the field called tilename, e.g. ab1234. (This should be a string field)
&amp;nbsp; name = row.getValue("TILE_NAME")

&amp;nbsp; # Set Output location
&amp;nbsp; outputlocation = arcpy.GetParameterAsText(0)
&amp;nbsp; 
&amp;nbsp; # Concatenate into whole path name
&amp;nbsp; outputName = outputlocation + "\\" + name + "_ArcMap" + ".tif"&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've just extracted this from a longer bit of code I posted here&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://forums.arcgis.com/threads/89608-python-script-zoom-to-each-county-in-a-state-shp-and-export-a-pdf-map" rel="nofollow noopener noreferrer" target="_blank"&gt;http://forums.arcgis.com/threads/89608-python-script-zoom-to-each-county-in-a-state-shp-and-export-a-pdf-map&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Dan&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 03:20:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/data-driven-pages-and-python/m-p/643416#M21453</guid>
      <dc:creator>DanielHall_Ballester</dc:creator>
      <dc:date>2021-12-12T03:20:22Z</dc:date>
    </item>
    <item>
      <title>Re: Data Driven Pages and python</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/data-driven-pages-and-python/m-p/643417#M21454</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;This is a duplicate thread to &lt;/SPAN&gt;&lt;A href="http://forums.arcgis.com/threads/81526-Data-Driven-Pages-python-help!?p=288729#post288729"&gt;this one &lt;/A&gt;&lt;SPAN&gt;in the Geoprocessing forum.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Aug 2013 22:46:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/data-driven-pages-and-python/m-p/643417#M21454</guid>
      <dc:creator>JoelCalhoun</dc:creator>
      <dc:date>2013-08-05T22:46:53Z</dc:date>
    </item>
  </channel>
</rss>

