Select to view content in your preferred language

Data Driven pages PDF (pageRow) Question

410
0
12-08-2021 11:22 AM
JordanBaltierra
New Contributor

Hello all,

Trying to export some data driven pages with dynamic names on multipage PDFs. The script works but exports only the first maps pageRow for each PDF ("ADRESS" = 1000 BISON AVE). Am I misunderstanding how pageRow works? I figured it would be dynamic for each indexed feature. Image of exported PDFs below as well as the script I am using. Thanks in advance.

JordanBaltierra_0-1638991206563.png

 

import arcpy

arcpy.env.overwriteOutput = True
mxd = arcpy.mapping.MapDocument(r"\\Balboa\Maps\ModelBuilderScripts\PrePlanMapbookExport\PrePlanMapbook.mxd")
ddp = mxd.dataDrivenPages

strOutpath = "\\\Balboa\\Maps\\ModelBuilderScripts\\PrePlanMapbookExport\\IndividualPages\\"

pageorder = mxd.dataDrivenPages.pageRow.getValue("PRE_PLAN_NUM")
pageindex = mxd.dataDrivenPages.pageRow.getValue("ADDRESS")
pdfname = pageorder+ "_" + pageindex + ".pdf"

ddp.exportToPDF(strOutpath + pdfname, 'ALL', multiple_files="PDF_MULTIPLE_FILES_PAGE_NAME")

Tags (2)
0 Kudos
0 Replies