HOW TO

Export a Map Series in ArcGIS Pro with Python

Last Published: August 4, 2022

Summary

ArcGIS Pro allows exporting layouts and map series from the Share tab > Export Layout tool. Alternatively, you can also export a map series using a Python script. This article describes the steps to do this.

Procedure

  • In ArcGIS Pro, you can run the script in a Python Notebook window
  • If using Notebook, ensure the cell type is Code
  1. Enter the following expression and replace the inputs in bold
import os

aprx = arcpy.mp.ArcGISProject(r"path of the project")  #"CURRENT" can also be used to replace the path
lyt = aprx.listLayouts()[x] #x: The number of the layout within the project
ms = lyt.mapSeries

ms.exportToPDF(os.path.join(r"Output Path", f"{lyt.name}"))
print("Export Succeeded")
  1. Click Run to execute the code
The picture below shows an example of how it looks in a Notebook
Notebook.jpg

You can also use an IDLE to run the script with Python, but the arcpy module must be imported as well. This module is not required when using the ArcGIS Pro environment. The same applies to the "CURRENT" value in the aprx parameter, this cannot be used outside ArcGIS Pro so you must copy the full path. The picture below shows an example:

IDLE.jpg

Article ID: 000028089

Receive notifications and find solutions for new or common issues

Get summarized answers and video solutions from our new AI chatbot.

Download the Esri Support App

Related Information

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options