AnsweredAssumed Answered

DDP export to rasters with page names?

Question asked by johns on Jul 20, 2012
Latest reply on Oct 1, 2013 by cdeangis
I have been using an arcpy script to export a view to a georeferenced tif, but the tifs come out as XXX1.tif, XXX2.tif, etc. where XXX is whatever text I put in the path and the number is the pageNum from the index file.  I'm probably missing something incredibly obvious but I can't find a way to have the output tifs include their individual DDP page names as happens with the standard export to pdf in a DDP.  Any suggestions?

If it makes it any easier here is the entire script which produces a series of tifs (and tfws) starting with currentName1.tif and ending at currentName19 in one particular case.

import arcpy
... mxd = arcpy.mapping.MapDocument("Current")
... df = arcpy.mapping.ListDataFrames(mxd)[0]
... ar = df.extent.height / df.extent.width
... for pageNum in range(1, mxd.dataDrivenPages.pageCount + 1):
...     mxd.dataDrivenPages.currentPageID = pageNum
...     print "Exporting page {0} of {1}".format(str(mxd.dataDrivenPages.currentPageID), str(mxd.dataDrivenPages.pageCount))
...     arcpy.mapping.ExportToTIFF(mxd,r"C:\Project\currentName" + str(pageNum) + ".tif",df,9306,9306*ar,300,True)
... del mxd