I'm trying to customize a data driven page looping statement workflow and want to set a better filename to the final export. Currently the file name uses the page index (pgIndex), but I would like it to use a specific field in the attribute table.
Here is my file naming looping statement:
for pgIndex in range(1, tempDDP.pageCount + 1, 1):
# Create a name for pdf file
temp_filename = r"C:\Desktop\Test\temp_pdfs\MB_" + \
str(pgIndex) + ".pdf"
if os.path.exists(temp_filename):
os.remove(temp_filename)
Any idea how I can get the result I want? I know this is possible if you use the built in export tool for arc 10, but I need more functionality, and therefore a customized script.