Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

Is it possible to enable time aware on a layer programmatically? I can add a time-enabled layer to a non-time aware data frame as shown here:

http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//00s300000023000000.htm

However, how can I get the layer to be time enabled in the first place (programmatically)?

I see that it is possible in arcobjects but I would rather not get into that.

Thanks!

share|improve this question
    
I am having the same issues and was wondering if anyone knows if this is at all possible in Arc 10.1. –  user16612 Mar 28 '13 at 16:29
    
Welcome and thanks for using this site! If the question being asked doesn't answer your question, consider asking a new question. Stackexchange works in a Q&A format rather than a conversation thread format. –  Jay Guarneri Mar 28 '13 at 16:55
add comment

2 Answers

up vote 3 down vote accepted

Time-aware layers are not in Python in 10.0, you'll need to use ArcObjects.

share|improve this answer
    
You have confirmed my suspicions, thank you. –  Eddie Jesinsky Feb 8 '11 at 16:46
add comment

I am taking some baby steps in programming here. So if I am too close to the fire don't let me get burned.
I guess you are saying you can't add the layer to a new dataframe and change the dataframe to time enabled.
1. Can you open an existing mxd and update the workspace paths or datasources?
2. Then add the layer to the existing dataframe that is already time enabled. As with example 2 below and modify the time settings?
Maybe that is (implied by your non-pursuit) the solution you already had in your head.
This is not a real answer (you already accepted one). Is it appropriate to follow-up an answer like this with further questions?

Quote from preceding esri link:

DataFrameTime example 2

The following script is identical to example 1 above but uses a modified start time, end time, and interval that are different from the existing settings that were published in a time-enabled data frame within a map document. The Python datetime module is used to create times and time deltas

import arcpy, datetime
mxd = arcpy.mapping.MapDocument(r"C:\Project\Project.mxd")
df = arcpy.mapping.ListDataFrames(mxd, "Traffic Analysis")[0]
df.time.currentTime = datetime.datetime(2008, 10, 1)
endTime = datetime.datetime(2008, 10, 31)
interval = datetime.timedelta(days=7)
while df.time.currentTime <= endTime:
    #An example str(newTime) would be: "2008-01-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 + interval
del mxd
share|improve this answer
    
This was not the question, it was about enabling time on a layer that did not have temporal information configured in the UI. –  Jason Scheirer Feb 9 '11 at 19:40
1  
huh?........... –  Brad Nesom Feb 9 '11 at 20:51
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.