I haven't tested this code but it should work, or at least not much editing 🙂
#Specify output path and final output PDF
outPath = r"C:MyProjectoutput\"
finalPdf = arcpy.mapping.PDFDocumentCreate(outPath + "ParcelReport.pdf")
#Specify the map document and the data frame
mxd = arcpy.mapping.MapDocument(r"C:MyProjectMyParcelMap.mxd")
df = arcpy.mapping.ListDataFrames(mxd, "Layers")[0]
#Select a parcel using the LocAddress attribute and zoom to selected
parcelLayer = arcpy.mapping.ListLayers(mxd, "Parcels", df)[0]
arcpy.SelectLayerByAttribute_management(parcelLayer, "NEW_SELECTION", "LocAddress" = '519 Main St')
df.zoomToSelectedFeatures()
#Turn on visibility for each theme and export the page
lyrList = ["Soils", "Floodplains", "Zones"]
for lyrName in lyrList:
lyr = arcpy.mapping.ListLayers(mxd, lyrName, df)[0]
lyr.visible = True
#Export each theme to a temporary PDF and append to the final PDF
tmpPdf = outPath + lyrName + "_temp.pdf"
if os.path.exists(tmpPdf):
os.remove(tmpPdf)
arcpy.mapping.ExportToPDF(mxd, tmpPdf)
finalPdf.appendPages(tmpPdf)
#Turn off layer visibility and clean up for next pass through the loop
lyr.visible = False
del lyr, tmpPdf
del mxd, df, finalPdf
The above code only exports the 3 pdf's for location address 519 Main St.The layers it sets as visible are Soils,Floodplains and Zones.If you want to automate the entire process then you need to have a list or a way to get the locaddresses.You could then loop trough the location adressess like this:
lyrList = ["Soils", "Floodplains", "Zones"]
for locaAddress in locAdresses:
finalPdf = arcpy.mapping.PDFDocumentCreate(outPath + "ParcelReport "+locAddress+".pdf")
arcpy.SelectLayerByAttribute_management(parcelLayer, "NEW_SELECTION", "LocAddress" = locAddress)
df.zoomToSelectedFeatures()
for lyrName in lyrList:
lyr = arcpy.mapping.ListLayers(mxd, lyrName, df)[0]
lyr.visible = True
#Export each theme to a temporary PDF and append to the final PDF
tmpPdf = outPath + lyrName + "_temp.pdf"
if os.path.exists(tmpPdf):
os.remove(tmpPdf)
arcpy.mapping.ExportToPDF(mxd, tmpPdf)
finalPdf.appendPages(tmpPdf)
#Turn off layer visibility and clean up for next pass through the loop
lyr.visible = False
del lyr, tmpPdf
Again the above code isn't tested but the idea is that it should give you 800 pdf's name for example ParcelRepor t519 Main St.pdfIt should contain 3 pages (because the lyrList has 3 items).I hope this helps