<?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 a map series to pdf with Python in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/export-a-map-series-to-pdf-with-python/m-p/1520828#M86928</link>
    <description>&lt;P&gt;Thank you&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/374676"&gt;@AubriOtis&lt;/a&gt;&amp;nbsp;this simple bit of code will save me so much time in exporting map series! I modified it to export all my map series within my project using this:&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;	import arcpy,os
	
	##Export to PDF
	aprx = arcpy.mp.ArcGISProject("CURRENT")
	for l in aprx.listLayouts():
	    if not l.mapSeries is None:
	        ms = l.mapSeries
	        ms.exportToPDF(f"C:\Temp\{l.name}.pdf")
	print("Done")
&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 13 Aug 2024 20:05:05 GMT</pubDate>
    <dc:creator>AbigailMcHenry</dc:creator>
    <dc:date>2024-08-13T20:05:05Z</dc:date>
    <item>
      <title>Export a map series to pdf with Python</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/export-a-map-series-to-pdf-with-python/m-p/1148153#M52026</link>
      <description>&lt;P&gt;Pro 2.9.1 - I have a mapbook that now crashes when you try to export anything, it either hangs forever, as in 48 hours later still grinding away with no progress, or sometimes it crashes to the desktop.&amp;nbsp; Same results if done with the series export as with the standard single sheet export.&amp;nbsp; So I need to use Python to export anything now.&amp;nbsp; What's the simplest way to export a map series via the Python window?&lt;/P&gt;</description>
      <pubDate>Fri, 25 Feb 2022 20:20:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/export-a-map-series-to-pdf-with-python/m-p/1148153#M52026</guid>
      <dc:creator>KeithAddison1</dc:creator>
      <dc:date>2022-02-25T20:20:30Z</dc:date>
    </item>
    <item>
      <title>Re: Export a map series to pdf with Python</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/export-a-map-series-to-pdf-with-python/m-p/1148161#M52027</link>
      <description>&lt;P&gt;see if any of this applies&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/t5/arcgis-pro-questions/arcgis-pro-2-9-map-series-export-crash/td-p/1117345" target="_blank"&gt;Solved: ArcGIS Pro 2.9 Map Series Export Crash - Esri Community&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 25 Feb 2022 20:41:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/export-a-map-series-to-pdf-with-python/m-p/1148161#M52027</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2022-02-25T20:41:16Z</dc:date>
    </item>
    <item>
      <title>Re: Export a map series to pdf with Python</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/export-a-map-series-to-pdf-with-python/m-p/1148169#M52028</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;There was a known crash with exporting when there was a blank text element on the layout, as Dan mentioned above. This was addressed in 2.9.1, which it sounds like you are using. If you can, I highly recommend reaching out to tech support so they can get this bug into the hands of the development team to be fixed. This is a definite problem.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the meantime, here is a simple python script that exports the first map series in the project to a single PDF file:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;##Export to PDF
aprx = arcpy.mp.ArcGISProject("CURRENT")
l = aprx.listLayouts()[0]
if not l.mapSeries is None:
    ms = l.mapSeries
    ms.exportToPDF(f"C:\Temp\{l.name}.pdf")
print("Done")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can learn more about the methods and customizations in the documentation here:&amp;nbsp;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/arcpy/mapping/mapseries-class.htm" target="_blank" rel="noopener"&gt;https://pro.arcgis.com/en/pro-app/latest/arcpy/mapping/mapseries-class.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope this helps.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Aubri&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 25 Feb 2022 21:28:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/export-a-map-series-to-pdf-with-python/m-p/1148169#M52028</guid>
      <dc:creator>AubriOtis</dc:creator>
      <dc:date>2022-02-25T21:28:54Z</dc:date>
    </item>
    <item>
      <title>Re: Export a map series to pdf with Python</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/export-a-map-series-to-pdf-with-python/m-p/1148180#M52029</link>
      <description>&lt;P&gt;Thanks for the response.&amp;nbsp; When I run this I get an error saying "name 'lyt' is not defined"&amp;nbsp; Which module do I need to import for it?&amp;nbsp; I've already got import arcpy, os, sys as part of my code.&lt;/P&gt;</description>
      <pubDate>Fri, 25 Feb 2022 21:17:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/export-a-map-series-to-pdf-with-python/m-p/1148180#M52029</guid>
      <dc:creator>KeithAddison1</dc:creator>
      <dc:date>2022-02-25T21:17:22Z</dc:date>
    </item>
    <item>
      <title>Re: Export a map series to pdf with Python</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/export-a-map-series-to-pdf-with-python/m-p/1148186#M52030</link>
      <description>&lt;P&gt;My apologies, that was a typo in my code. It should be ms = l.mapSeries. I've edited the comment above to fix the code.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 25 Feb 2022 21:28:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/export-a-map-series-to-pdf-with-python/m-p/1148186#M52030</guid>
      <dc:creator>AubriOtis</dc:creator>
      <dc:date>2022-02-25T21:28:31Z</dc:date>
    </item>
    <item>
      <title>Re: Export a map series to pdf with Python</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/export-a-map-series-to-pdf-with-python/m-p/1148215#M52031</link>
      <description>&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 25 Feb 2022 22:08:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/export-a-map-series-to-pdf-with-python/m-p/1148215#M52031</guid>
      <dc:creator>KeithAddison1</dc:creator>
      <dc:date>2022-02-25T22:08:15Z</dc:date>
    </item>
    <item>
      <title>Re: Export a map series to pdf with Python</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/export-a-map-series-to-pdf-with-python/m-p/1520828#M86928</link>
      <description>&lt;P&gt;Thank you&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/374676"&gt;@AubriOtis&lt;/a&gt;&amp;nbsp;this simple bit of code will save me so much time in exporting map series! I modified it to export all my map series within my project using this:&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;	import arcpy,os
	
	##Export to PDF
	aprx = arcpy.mp.ArcGISProject("CURRENT")
	for l in aprx.listLayouts():
	    if not l.mapSeries is None:
	        ms = l.mapSeries
	        ms.exportToPDF(f"C:\Temp\{l.name}.pdf")
	print("Done")
&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Aug 2024 20:05:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/export-a-map-series-to-pdf-with-python/m-p/1520828#M86928</guid>
      <dc:creator>AbigailMcHenry</dc:creator>
      <dc:date>2024-08-13T20:05:05Z</dc:date>
    </item>
  </channel>
</rss>

