<?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: Missing methods for map series export to PDF in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/missing-parameters-for-map-series-exporttopdf/m-p/1049643#M39963</link>
    <description>&lt;P&gt;If I try to insert the &lt;SPAN&gt;{page_range_type}, {page_range_string}, and {multiple_files}&amp;nbsp;&lt;/SPAN&gt;parameters, I get an error that the value for the image_quality parameter — the parameter that should come next if you ignore the page_range parameters — isn't valid:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;if not HPCcase.mapSeries is None:
    ms = HPCcase.mapSeries
    if ms.enabled:
        ms = HPCcase.mapSeries
        indexLyr = ms.indexLayer
        arcpy.management.SelectLayerByAttribute(indexLyr, "NEW_SELECTION")
        pageName = ms.pageRow.ConcatAddr
        HPCcase.exportToPDF(os.path.join(PDFpath, "20210513", f"HPC_20210513_{pageName}.pdf"),'SELECTED','','PDF_MULTIPLE_FILES_PAGE_NAME',300, 'BEST','True', 'ADAPTIVE','True', 'LAYERS_ONLY','True',80,'False','False','False','True')
&amp;lt;Result 'Sites'&amp;gt;
Traceback (most recent call last):
  File "&amp;lt;string&amp;gt;", line 8, in &amp;lt;module&amp;gt;
  File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\utils.py", line 163, in fn_
    arg_name].keys())))
ValueError: Invalid value for image_quality: '' (choices are: ['BEST', 'BETTER', 'NORMAL', 'FASTER', 'FASTEST'])&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 21 Apr 2021 18:01:07 GMT</pubDate>
    <dc:creator>JeffThomasILM</dc:creator>
    <dc:date>2021-04-21T18:01:07Z</dc:date>
    <item>
      <title>Missing parameters for map series exportToPDF method</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/missing-parameters-for-map-series-exporttopdf/m-p/1049605#M39958</link>
      <description>&lt;P data-unlink="true"&gt;I'm trying to export selected pages from a map series (by manually selecting/highlighting them in the Contents pane, or using a SQL query on the index layer) to PDF using Python. The&amp;nbsp;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/arcpy/mapping/mapseries-class.htm" target="_blank" rel="noopener"&gt;MapSeries Documentation&lt;/A&gt;&amp;nbsp;mentions parameters&amp;nbsp;&lt;SPAN&gt;{page_range_type}, {page_range_string}, and {multiple_files} that sound like exactly what I need, but the code examples on that same page don't utilize those parameters. They instead use loops, which would be unnecessary&amp;nbsp;if the above parameters actually worked(?). When using the interactive Python window in Pro, the code completion also does not utilize them. Attempting to use them just throws an error. Am I missing the proper context for these parameters? Are they not implemented (yet)? Please advise. Thanks!&lt;/SPAN&gt;&lt;/P&gt;&lt;P data-unlink="true"&gt;Edit: sorry, I was using the wrong terminology. It is &lt;EM&gt;parameters&lt;/EM&gt; for the exportToPDF method that are missing. I changed all use of the word method to parameter.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Apr 2021 16:02:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/missing-parameters-for-map-series-exporttopdf/m-p/1049605#M39958</guid>
      <dc:creator>JeffThomasILM</dc:creator>
      <dc:date>2021-04-21T16:02:41Z</dc:date>
    </item>
    <item>
      <title>Re: Missing methods for map series export to PDF</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/missing-parameters-for-map-series-exporttopdf/m-p/1049624#M39959</link>
      <description>&lt;P&gt;You will have to provide sample lines Jeff for what you have tried.&amp;nbsp; There are some which are obvious and some that aren't (ie the string format for&amp;nbsp;multiple_files)&lt;/P&gt;</description>
      <pubDate>Wed, 21 Apr 2021 15:46:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/missing-parameters-for-map-series-exporttopdf/m-p/1049624#M39959</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2021-04-21T15:46:14Z</dc:date>
    </item>
    <item>
      <title>Re: Missing methods for map series export to PDF</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/missing-parameters-for-map-series-exporttopdf/m-p/1049633#M39961</link>
      <description>&lt;P&gt;Since I barely know what I'm doing with Python&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":grinning_face:"&gt;😀&lt;/span&gt;, I've only tried to write code that is very similar to the examples. I was attempting to write a cross between example 2 (which writes each page to a separate PDF) and example 3 (which exports selected pages):&lt;/P&gt;&lt;LI-CODE lang="python"&gt;import arcpy, os, sys

PDFpath = 'V:\\projects\\DevSvcs\\Planning\\HistoricDistrict\\HPC\\'
aprx = arcpy.mp.ArcGISProject('CURRENT')
HPCcase = aprx.listLayouts('HPC Case Layout')[0]
relpath = os.path.dirname(sys.argv[0])

if not HPCcase.mapSeries is None:
    ms = HPCcase.mapSeries
    if ms.enabled:
        ms = HPCcase.mapSeries
        indexLyr = ms.indexLayer
        arcpy.management.SelectLayerByAttribute(indexLyr, "NEW_SELECTION", "'HPCDate'= '2021-05-13'")
        pageName = ms.pageRow.ConcatAddr
        HPCcase.exportToPDF(os.path.join(PDFpath, "20210513", f"HPC_20210513_{pageName}.pdf"))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;I have run this in the interactive Python window. It exports only the page active in the map frame, even if I have multiple pages selected/highlighted in the Contents pane. It also ignores my SQL query.&lt;/P&gt;</description>
      <pubDate>Wed, 21 Apr 2021 15:55:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/missing-parameters-for-map-series-exporttopdf/m-p/1049633#M39961</guid>
      <dc:creator>JeffThomasILM</dc:creator>
      <dc:date>2021-04-21T15:55:46Z</dc:date>
    </item>
    <item>
      <title>Re: Missing methods for map series export to PDF</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/missing-parameters-for-map-series-exporttopdf/m-p/1049643#M39963</link>
      <description>&lt;P&gt;If I try to insert the &lt;SPAN&gt;{page_range_type}, {page_range_string}, and {multiple_files}&amp;nbsp;&lt;/SPAN&gt;parameters, I get an error that the value for the image_quality parameter — the parameter that should come next if you ignore the page_range parameters — isn't valid:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;if not HPCcase.mapSeries is None:
    ms = HPCcase.mapSeries
    if ms.enabled:
        ms = HPCcase.mapSeries
        indexLyr = ms.indexLayer
        arcpy.management.SelectLayerByAttribute(indexLyr, "NEW_SELECTION")
        pageName = ms.pageRow.ConcatAddr
        HPCcase.exportToPDF(os.path.join(PDFpath, "20210513", f"HPC_20210513_{pageName}.pdf"),'SELECTED','','PDF_MULTIPLE_FILES_PAGE_NAME',300, 'BEST','True', 'ADAPTIVE','True', 'LAYERS_ONLY','True',80,'False','False','False','True')
&amp;lt;Result 'Sites'&amp;gt;
Traceback (most recent call last):
  File "&amp;lt;string&amp;gt;", line 8, in &amp;lt;module&amp;gt;
  File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\utils.py", line 163, in fn_
    arg_name].keys())))
ValueError: Invalid value for image_quality: '' (choices are: ['BEST', 'BETTER', 'NORMAL', 'FASTER', 'FASTEST'])&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Apr 2021 18:01:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/missing-parameters-for-map-series-exporttopdf/m-p/1049643#M39963</guid>
      <dc:creator>JeffThomasILM</dc:creator>
      <dc:date>2021-04-21T18:01:07Z</dc:date>
    </item>
    <item>
      <title>Re: Missing parameters for map series exportToPDF method</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/missing-parameters-for-map-series-exporttopdf/m-p/1049833#M40002</link>
      <description>&lt;P&gt;Hello Jeff.&amp;nbsp; We unfortunately don't have samples for all possible parameter combinations but this would be a good one.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is a snippet that I just recently used for a project I was working on:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;map_series = layout.mapSeries
if map_series.enabled:
  output = os.path.join(policy_folder, layout_name + ".pdf")
  indexLyr = map_series.indexLayer
  where_clause = f"{policy_field} = {policy_number}"       
  arcpy.SelectLayerByAttribute_management(in_layer_or_view=indexLyr,
                                          selection_type="NEW_SELECTION",
                                          where_clause=where_clause)    
  map_series.exportToPDF(out_pdf=output, 
                         page_range_type="SELECTED",
                         resolution=300)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope this helps you,&lt;/P&gt;&lt;P&gt;Jeff - arcpy.mp and Layout teams&lt;/P&gt;</description>
      <pubDate>Wed, 21 Apr 2021 21:07:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/missing-parameters-for-map-series-exporttopdf/m-p/1049833#M40002</guid>
      <dc:creator>JeffBarrette</dc:creator>
      <dc:date>2021-04-21T21:07:25Z</dc:date>
    </item>
    <item>
      <title>Re: Missing parameters for map series exportToPDF method</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/missing-parameters-for-map-series-exporttopdf/m-p/1049835#M40003</link>
      <description>&lt;P&gt;From&amp;nbsp;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/arcpy/mapping/mapseries-class.htm" target="_blank"&gt;MapSeries—ArcGIS Pro | Documentation&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;lets break down some of the required and optional parameters.&amp;nbsp; If you are starting out, you can provide the parameter name and the value as shown below.... You don't need to if you never need to go back and figure out what your variables are or never need to document what you have done (hence&amp;nbsp;&lt;/P&gt;&lt;P&gt;snip ......&lt;/P&gt;&lt;P&gt;exportToPDF (&lt;/P&gt;&lt;P&gt;out_pdf = (os.path.join(PDFpath, "20210513", f"HPC_20210513_{pageName}.pdf"),&lt;/P&gt;&lt;P&gt;page_range_type = 'SELECTED',&lt;/P&gt;&lt;P&gt;page_range_string = "",&lt;/P&gt;&lt;P&gt;multiple_files = 'PDF_MULTIPLE_FILES_PAGE_NAME' ,&lt;/P&gt;&lt;P&gt;resolution = 300,&lt;/P&gt;&lt;P&gt;image_quality = "BEST",&lt;/P&gt;&lt;P&gt;compress_vector_graphics = True, ******** not 'True'&lt;/P&gt;&lt;P&gt;etc.&lt;/P&gt;&lt;P&gt;booleans are True or False&lt;/P&gt;&lt;P&gt;strings would be "True" or "False&lt;/P&gt;</description>
      <pubDate>Wed, 21 Apr 2021 21:15:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/missing-parameters-for-map-series-exporttopdf/m-p/1049835#M40003</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2021-04-21T21:15:18Z</dc:date>
    </item>
    <item>
      <title>Re: Missing parameters for map series exportToPDF method</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/missing-parameters-for-map-series-exporttopdf/m-p/1049867#M40009</link>
      <description>&lt;P&gt;Thank you,&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/1134"&gt;@JeffBarrette&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/215600"&gt;@DanPatterson&lt;/a&gt;.&lt;/P&gt;&lt;P&gt;I'm realizing a few good nuggets of information from your responses.&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;What I called a loop in my o.p. is not a loop; it's a conditional.&lt;/LI&gt;&lt;LI&gt;You don't have to specify every single parameter for the method (but you can, as long as you follow the specified order); you just need to specify the name of the parameter(s) you want.&lt;/LI&gt;&lt;LI&gt;Booleans are like integers, no quotes.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;A few outstanding questions: Why are the page_range parameters not included in the full, non-named parameter array for the method? Are there other (hidden) parameters? Is it common to have additional parameters that can only be called by name?&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 21 Apr 2021 22:29:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/missing-parameters-for-map-series-exporttopdf/m-p/1049867#M40009</guid>
      <dc:creator>JeffThomasILM</dc:creator>
      <dc:date>2021-04-21T22:29:48Z</dc:date>
    </item>
    <item>
      <title>Re: Missing parameters for map series exportToPDF method</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/missing-parameters-for-map-series-exporttopdf/m-p/1049877#M40011</link>
      <description>&lt;P&gt;Jeff,&lt;/P&gt;&lt;P&gt;There are no hidden parameters in Python. The autocomplete should should you the full list of parameter names and their order.&amp;nbsp; What makes this function a little unique is that you won't always specify all parameters in their order because some are conditional.&amp;nbsp; For example page_range_string is ONLY evaluated IF page_range_type is set to RANGE.&amp;nbsp; This is documented in the help but I certainly understand your confusion.&amp;nbsp; I'm happy to see you got it figured out.&amp;nbsp; I realized after that example 3 is very similar to the code I sent you.&lt;/P&gt;&lt;P&gt;Jeff - arcpy.mp and Layout teams&lt;/P&gt;</description>
      <pubDate>Wed, 21 Apr 2021 22:56:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/missing-parameters-for-map-series-exporttopdf/m-p/1049877#M40011</guid>
      <dc:creator>JeffBarrette</dc:creator>
      <dc:date>2021-04-21T22:56:15Z</dc:date>
    </item>
    <item>
      <title>Re: Missing parameters for map series exportToPDF method</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/missing-parameters-for-map-series-exporttopdf/m-p/1050105#M40057</link>
      <description>&lt;P&gt;I'm trying to actually implement the knowledge this morning I got from this thread yesterday. I'm getting an error when I try to run my script. I can't figure out what I've done wrong.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;import arcpy, os, sys

aprx = arcpy.mp.ArcGISProject('CURRENT')
HPCcase = aprx.listLayouts('HPC Case Layout')[0]

ms = HPCcase.mapSeries
if ms.enabled:
    ms = HPCcase.mapSeries
    indexLyr = ms.indexLayer
    PDFpath = 'V:\\projects\\DevSvcs\\Planning\\HistoricDistrict\\HPC\\'
    HPCdate = '20210513'
    arcpy.management.SelectLayerByAttribute(in_layer_or_view=indexLyr,
                                            selection_type="NEW_SELECTION",
                                            where_clause=f"'HPCDate'='2021-05-13'")
    pageName = ms.pageRow.ConcatAddr
    HPCcase.exportToPDF(out_pdf=os.path.join(PDFpath, HPCdate, f"HPC_{HPCdate}_{pageName}.pdf"),
                        page_range_type="SELECTED",
                        multiple_files="PDF_MULTIPLE_FILES_PAGE_NAME",
                        resolution=300)&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;Traceback (most recent call last):
  File "&amp;lt;string&amp;gt;", line 19, in &amp;lt;module&amp;gt;
  File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\utils.py", line 191, in fn_
    return fn(*args, **kw)
TypeError: exportToPDF() got an unexpected keyword argument 'page_range_type'&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In addition to the export error, I'm pretty sure nothing is getting selected in my index layer. Since a date is the selecting criterion, it's an additional syntax hurdle to make sure I'm doing it exactly right. When I create the features, I only care about the date, not the time. (Time should always be 00:00:00, but I'd rather it not be a factor just in case.)&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also, I want to make sure I understand how the selected page range works for exporting in Python.&amp;nbsp;Does it only work by selecting index features also in Python? Is it possible to select one or more pages manually in the Contents pane, then export with Python without further specifying a selection?&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 22 Apr 2021 15:10:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/missing-parameters-for-map-series-exporttopdf/m-p/1050105#M40057</guid>
      <dc:creator>JeffThomasILM</dc:creator>
      <dc:date>2021-04-22T15:10:09Z</dc:date>
    </item>
    <item>
      <title>Re: Missing parameters for map series exportToPDF method</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/missing-parameters-for-map-series-exporttopdf/m-p/1050132#M40065</link>
      <description>&lt;P&gt;Jeff, I see two mistakes.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1) your where clause is forcing single quotes around the field name.&amp;nbsp; I don't think you want them.&amp;nbsp; A simple way to validate your where clause is to try to build the same query via the Definition Query interface.&amp;nbsp; Build the query you want there and click the SQL button to see the correct formatting.&amp;nbsp; Then use print statements in your code to make sure the query is correct.&lt;/P&gt;&lt;P&gt;2) You are exporting the LAYOUT object, NOT the MS object.&amp;nbsp; The layout does NOT support page_range_type, the MS object does.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Jeff - arcpy.mp and Layout teams&lt;/P&gt;</description>
      <pubDate>Thu, 22 Apr 2021 15:50:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/missing-parameters-for-map-series-exporttopdf/m-p/1050132#M40065</guid>
      <dc:creator>JeffBarrette</dc:creator>
      <dc:date>2021-04-22T15:50:56Z</dc:date>
    </item>
    <item>
      <title>Re: Missing parameters for map series exportToPDF method</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/missing-parameters-for-map-series-exporttopdf/m-p/1050243#M40079</link>
      <description>&lt;P&gt;Ah! MS vs. Layout also explains why the code complete wasn't working. You were of course right about removing the single quotes from the field name. I thought they were required if using a file GDB, but apparently not. A lot of trial and error went into formatting the SQL statement properly for Python, and that was what I finally arrived at that didn't create an error. However, it also didn't create a selection! Thanks again!&lt;/P&gt;</description>
      <pubDate>Thu, 22 Apr 2021 18:30:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/missing-parameters-for-map-series-exporttopdf/m-p/1050243#M40079</guid>
      <dc:creator>JeffThomasILM</dc:creator>
      <dc:date>2021-04-22T18:30:36Z</dc:date>
    </item>
    <item>
      <title>Re: Missing parameters for map series exportToPDF method</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/missing-parameters-for-map-series-exporttopdf/m-p/1050251#M40081</link>
      <description>&lt;P&gt;Yeah, you had me scratching my head on the missing parameters. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp; Again, its a great idea to build the query in the Definition Query dialog and look at the SQL string.&amp;nbsp; Good luck moving forward.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Jeff&lt;/P&gt;</description>
      <pubDate>Thu, 22 Apr 2021 18:43:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/missing-parameters-for-map-series-exporttopdf/m-p/1050251#M40081</guid>
      <dc:creator>JeffBarrette</dc:creator>
      <dc:date>2021-04-22T18:43:32Z</dc:date>
    </item>
  </channel>
</rss>

