Hello. I am very green with Python. I'm trying to create a series of maps using the time slider. I found a script that works (produces the maps in PDF), but the extent is incorrect and the resolution is low. Help... understanding that I'm very new to Pyth

362
0
03-03-2017 09:18 AM
DaveWatson1
New Contributor

This is my script

>>> import arcpy

... import os

...

... mxd = arcpy.mapping.MapDocument(r"G:\GIS\Maps\Projects.mxd")

... df = arcpy.mapping.ListDataFrames(mxd, "Layers")[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] + ".pdf"

... arcpy.mapping.ExportToPDF(mxd, os.path.join(r"G:\GIS\GIS_Analysis\CS_Working_Group\Time Maps", fileName), df)

... df.time.currentTime = df.time.currentTime + df.time.timeStepInterval

... del mxd

Tags (2)
0 Kudos
0 Replies