Solved! Go to Solution.
import arcpy mxd = arcpy.mapping.MapDocument(r"S:\GIS\Appalachia\Map Projects\Midstream\Exhibits\Gathering Maps\Gathering Mapbook.mxd") ddp = mxd.dataDrivenPages ddp.exportToPDF(r"C:\Temp\Page", "ALL", multiple_files = "PDF_MULTIPLE_FILES_PAGE_NAME"
import arcpy, os mxdPath = r"C:\Temp\DDP.mxd" mxd = arcpy.mapping.MapDocument(mxdPath) mxdDir = os.path.dirname(mxdPath) for pageNum in range(1, mxd.dataDrivenPages.pageCount + 1): mxd.dataDrivenPages.currentPageID = pageNum pageName = mxd.dataDrivenPages.pageRow.NAME mxdName = os.path.join(mxdDir, "_" + str(pageName) + ".mxd") print mxdName mxd.saveACopy(mxdName) del mxd
pageName = mxd.dataDrivenPages.pageROW.SHEET
pageName = mxd.dataDrivenPages.pageRow.SHEET
import arcpy mxd = arcpy.mapping.MapDocument(r"S:\GIS\Appalachia\Map Projects\Midstream\Exhibits\Gathering Maps\Gathering Mapbook.mxd") ddp = mxd.dataDrivenPages ddp.exportToPDF(r"C:\Temp\Page", "ALL", multiple_files = "PDF_MULTIPLE_FILES_PAGE_NAME"
import arcpy mxd = arcpy.mapping.MapDocument(r"C:\Temp\GreatLakes.mxd") ddp = mxd.dataDrivenPages for pageNum in range(1, ddp.pageCount + 1): ddp.currentPageID = pageNum print "Saving %s.mxd" %(ddp.pageRow.getValue(ddp.pageNameField.name)) mxd.saveACopy(r"C:\Temp\\" + ddp.pageRow.getValue(ddp.pageNameField.name) + ".mxd") del mxd