1

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")
0

A layout can only contain a single MapSeries object.

Consequently, to support multiple map series in a single project you will need to have multiple layouts (each with one map series enabled).

You can then use ListLayouts with an index to create Layout objects from them.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.