Advertisement
Guest User

Untitled

a guest
May 4th, 2015
292
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.57 KB | None | 0 0
  1. import arcpy, datetime
  2. import os
  3.  
  4. mxd = arcpy.mapping.MapDocument(r"D:\Workings\PTV\GTFS_Vimeo.mxd")
  5. df = arcpy.mapping.ListDataFrames(mxd, "Layers")[0]
  6. df.time.currentTime = df.time.startTime
  7.  
  8. while df.time.currentTime <= df.time.endTime:
  9.     theTime = df.time.currentTime.strftime('%HH_%MM')
  10.     print "theTime = " + theTime
  11.     fileName = theTime + ".png"
  12.     print "This is fileName: " + fileName
  13.     arcpy.mapping.ExportToPNG(mxd, os.path.join(r"D:\Workings\PTV\Output", fileName))
  14.     df.time.currentTime = df.time.currentTime + df.time.timeStepInterval
  15. del mxd
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement