import arcpy mxd = arcpy.mapping.MapDocument(r"C:\Project\project.mxd") pict = arcpy.mapping.ListLayoutElements(mxd, "PICTURE_ELEMENT", "photo")[0] for pageNum in range(1, mxd.dataDrivenPages.pageCount + 1): mxd.dataDrivenPages.currentPageID = pageNum photoField = mxd.dataDrivenPages.pageRow.picture #picture is the name of the field in the index layer pict.imageSource = photoField arcpy.mapping.ExportToPDF(mxd, r"C:\Project\OutPut\Output" + str(pageNum) + ".pdf") del mxd
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.