Currently working a project that contains 9 map series with over 22,000 pages total - split across datum and scale. Want to script a solution that allows us to export pages as individual PDFs by selecting a specific series and range - ultimately to allow us to have multiple PC's exporting maps at once.
All the examples on the ArcGIS Pro help appear to be referencing projects with a single Map Series so I'm a bit stuck how to approach. So far I've written a small script to check for the presence of the series and return the page count:
print("Layouts:") for lyt in aprx.listLayouts(): print(lyt.name) ms = lyt.mapSeries if ms is None: print('\t'+"None available") else: if ms is not None: print('\t'+"Page count:",ms.pageCount)
I can export a PDF based off a selection on the index layer - however the problem I am finding is I don't know which map series the selection is operating on. Anyone have to suggestions to specify which map series? Would ideally prefer to go with ranges than selecting attributes (ie 1 - 500, 501 - 1000 etc)
#make a selection based off index feature if not lyt.mapSeries is None: ms = lyt.mapSeries if ms.enabled: ms = lyt.mapSeries indexLyr = ms.indexLayer arcpy.SelectLayerByAttribute_management(indexLyr, "NEW_SELECTION", "ZONE = '56'") ms.exportToPDF(Output + "\\TEST.pdf", "SELECTED")