Created
March 25, 2015 09:11
-
-
Save cindygis/f4466e7b2ee37acce524 to your computer and use it in GitHub Desktop.
Basic export of data driven pages to multiple jpegs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import arcpy | |
import os | |
mxd = arcpy.mapping.MapDocument(r"C:\Some\Arb\Folder\Test.mxd") | |
fld = r"C:\Some\Arb\Folder\jpegs" | |
ddp = mxd.dataDrivenPages | |
for i in range(1, ddp.pageCount + 1): | |
ddp.currentPageId = i | |
name = os.path.join(fld, ddp.pageRow.getValue(ddp.pageNameField) + ".jpg") | |
arcpy.mapping.ExportToJPEG(mxd, name) | |
print("Exported " + name) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment