<?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: How to use Python to export selected data driven pages? in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/how-to-use-python-to-export-selected-data-driven/m-p/703568#M54463</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Don't know why, but suddenly I'm able to export the selected pages, as expected, without any changes to the code.&amp;nbsp; The issue now is that I want to export each page to separate pdf files, but can�??t.&amp;nbsp; I change the code to something like�?�&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
tempDDP.exportToPDF(temp_filename, "SELECTED","PDF_MULTIPLE_FILES_PAGE_INDEX")
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;it runs ok, but still creates just 1 pdf file with all my selected pages in it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;any help is appreciated...&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 12 Dec 2021 05:35:24 GMT</pubDate>
    <dc:creator>Ulises</dc:creator>
    <dc:date>2021-12-12T05:35:24Z</dc:date>
    <item>
      <title>How to use Python to export selected data driven pages?</title>
      <link>https://community.esri.com/t5/python-questions/how-to-use-python-to-export-selected-data-driven/m-p/703567#M54462</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I???m trying to export to pdf just the selected data driven pages from a test mxd prepared, but I keep getting an error message.&amp;nbsp; I???m writing in the python window in desktop the following lines:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;PRE class="plain" name="code"&gt;mxd = arcpy.mapping.MapDocument ("C:/Workspace/MyTESTS/DDP/MyDDP1K_Test.mxd")&amp;nbsp; tempDDP = mxd.dataDrivenPages&amp;nbsp; tempDDP.exportToPDF("C:/Workspace/MyTESTS/DDP/tempDDP.pdf","CURRENT") ??? test1...works fine&amp;nbsp; tempDDP.exportToPDF("C:/Workspace/MyTESTS/DDP/tempDDP.pdf","RANGE","5-12") ??? test2...works fine&amp;nbsp; tempDDP.exportToPDF("C:/Workspace/MyTESTS/DDP/tempDDP.pdf","SELECTED")&amp;nbsp; --test3...error (I had 3 pages selected and it works fine when doing it manually) &lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any help is appreciated...&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Jan 2012 13:21:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-use-python-to-export-selected-data-driven/m-p/703567#M54462</guid>
      <dc:creator>Ulises</dc:creator>
      <dc:date>2012-01-26T13:21:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to use Python to export selected data driven pages?</title>
      <link>https://community.esri.com/t5/python-questions/how-to-use-python-to-export-selected-data-driven/m-p/703568#M54463</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Don't know why, but suddenly I'm able to export the selected pages, as expected, without any changes to the code.&amp;nbsp; The issue now is that I want to export each page to separate pdf files, but can�??t.&amp;nbsp; I change the code to something like�?�&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
tempDDP.exportToPDF(temp_filename, "SELECTED","PDF_MULTIPLE_FILES_PAGE_INDEX")
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;it runs ok, but still creates just 1 pdf file with all my selected pages in it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;any help is appreciated...&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 05:35:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-use-python-to-export-selected-data-driven/m-p/703568#M54463</guid>
      <dc:creator>Ulises</dc:creator>
      <dc:date>2021-12-12T05:35:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to use Python to export selected data driven pages?</title>
      <link>https://community.esri.com/t5/python-questions/how-to-use-python-to-export-selected-data-driven/m-p/703569#M54464</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;It is because you are assigning "PDF_MULTIPLE_FILES_PAGE_INDEX" to the wrong parameter.&amp;nbsp; You are assigning it to {page_range_string} and not {multiple_files}.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;To skip {page_range_string} and assing {multiple_files} try:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;tempDDP.exportToPDF(temp_filename, "SELECTED",multiple_files="PDF_MULTIPLE_FILES_PAGE_INDEX")&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you want to skip parameters in Python you must type in the parameter name.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Jeff&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Jan 2012 15:45:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-use-python-to-export-selected-data-driven/m-p/703569#M54464</guid>
      <dc:creator>JeffBarrette</dc:creator>
      <dc:date>2012-01-27T15:45:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to use Python to export selected data driven pages?</title>
      <link>https://community.esri.com/t5/python-questions/how-to-use-python-to-export-selected-data-driven/m-p/703570#M54465</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks, Jeff...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Problem solved...&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Jan 2012 18:21:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-use-python-to-export-selected-data-driven/m-p/703570#M54465</guid>
      <dc:creator>Ulises</dc:creator>
      <dc:date>2012-01-31T18:21:37Z</dc:date>
    </item>
  </channel>
</rss>

