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
Membros conectados podem postar, seguir atualizações e mais. Novo aqui? Registre uma conta gratuita.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.