Name file based on column information, data driven pages

المشرف العام

Administrator
طاقم الإدارة
I am using data driven pages to export 300 maps into PNG-files. I would like to name every exported PNG-file based on information from a column in the attribute table. What is the code for that? The code I´m using (which doesn´t work properly) is below:

mxd = arcpy.mapping.MapDocument("CURRENT")for pageNum in range(1, mxd.dataDrivenPages.pageCount + 1): mxd.dataDrivenPages.currentPageID = pageNum arcpy.mapping.ExportToPNG(mxd, r"C:\Users\Desktop\a" + str(mxd.dataDrivenPages.pageNameField.name) + ".png",resolution=300)del mxdI would really appreciate some help!



أكثر...
 
أعلى