Advertisement
Guest User

Untitled

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