I have an ArcPy script below to export a map book to PDF. The index layer are forty acre boundaries (township and range quarter sections). The data in the mxd is on an oracle database and updated nightly.
I want to use task manager to run the script nightly but I would like to add code so that only mxd's with edits/changes to the data in its geographic extent from the previous days version will export.
The reason for this is there are approximately 12,000 of these boundaries and it takes about 21 hours to run. I am hoping to dramatically reduce that. Here is the code:
import arcpy
arcpy.env.overwriteOutput = True
mxd = arcpy.mapping.MapDocument(r"C:\SamplePath\SampleMXD.mxd")
for pageNum in range(1, mxd.dataDrivenPages.pageCount + 1):
mxd.dataDrivenPages.currentPageID = pageNum
pageName = mxd.dataDrivenPages.pageRow.FORTYAC
arcpy.mapping.ExportToPDF(mxd, r"C:\SamplePath\SampleFileName_" + str(pageName) + ".pdf")
del mxd