Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import arcpy
- mxd = arcpy.mapping.MapDocument(r"C:\Project\Asthma.mxd")
- df = arcpy.mapping.ListDataFrames(mxd, "ER Visits by Residence Lat/Lon")[0]
- df.time.currentTime = df.time.startTime
- while df.time.currentTime <= df.time.endTime:
- #An example str(newTime) would be: "2008-12-29 02:19:59"
- #The following line splits the string at the space and takes the first
- #item in the resulting string.
- fileName = str(df.time.currentTime).split(" ")[0] + ".png"
- arcpy.mapping.ExportToPNG(mxd, r"C:\Project\Output\\" + fileName, df)
- df.time.currentTime = df.time.currentTime + df.time.timeStepInterval
- del mxd
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement