Map Series export individual project

168
0
01-20-2022 08:39 AM
VagIlias87
New Contributor

Hi, 

I trying to loop through the Map Series and each page to exported as aprx file as a single project 

I have used the following code but is exporting the layout, I tried to loop through the map series and constantly im receiving an error that the Maps series is not iterable. 

Have any of you tried that before I have stuck now? I have tried to use the cursor as well but seems to receive an errors that says can not open 

Any advice is welcome

 

import arcpy
try:

aprx = arcpy.mp.ArcGISProject(r"C:\Users\NataliSuportman\Documents\ArcGIS\Projects\A120 Essex\A120 Essex A3 template.aprx")

l = aprx.listLayouts("058_ARDG_A120_LOP_OPTB 1 2")[0]
if not l.mapSeries is None:
print(" " + l.name)
l.exportToPAGX(r'C:\Users\NataliSuportman\Documents\ArcGIS\Projects\A120 Essex\058_A120.pagx')

except Exception as e:
print("Error: " + e.args[0])
#print(time.asctime())

 

Tags (1)
0 Kudos
0 Replies