arcpy启用图层时间属性

import arcpy.mapping as mapping, os
mxd = mapping.MapDocument(“CURRENT”)
df = mapping.ListDataFrames(mxd, “Crime”)[0]
dft = df.time
dft.currentTime = dft.startTime

while dft.currentTime <= dft.endTime:
    fileName = str(dft.currentTime).split(” “)[0] + “.pdf”
    mapping.ExportToPDF(mxd,os.path.join(r”C:\ArcpyBook\Ch2″, fileName))
    print(“Exported ” + fileName)
    dft.currentTime = dft.currentTime + dft.timeStepInterval
 

转载自:https://blog.csdn.net/A873054267/article/details/85871246

You may also like...