Select to view content in your preferred language

Access to Current Time Slider Value via ArcPy

1389
2
05-02-2012 07:06 AM
RolandoRaqueño
New Contributor
Hello,

We are searching for an ArcPy method that can query the current time set by the user on the time slider so that we can pass this information to another model that will use it as a starting point for a simulation.  Not sure if this is in the ArcPy Data Access Module or not.

Our intent is to capture two points in the timeline and pass that information to a model that will take the time-endpoints and initiate an interpolation prediction model of imagery (through ModelBuilder) between those two times and send it back into the ArcMap environment for comparison between the real imagery specified by the two time points.

Capture of this information ideally would be initiated from ArcMap using an add-in or similar process that the user can invoke.

I have seen references of accessing time slider information from the Web API end (http://blogs.esri.com/esri/arcgis/2011/07/20/visualizing-time-aware-data-in-a-web-map/), but would like to start with a simple case and do it from ArcMap.

Any insight would be welcome.

Thanks,

R. Raqueño
Tags (2)
0 Kudos
2 Replies
ChrisFox3
Frequent Contributor
Hi Rolando,

Yes, you will want to use the DataFrameTime class in the mapping module to get this information. Below is an example:

import arcpy
mxd = arcpy.mapping.MapDocument(r"C:\Project\Project.mxd")
df = arcpy.mapping.ListDataFrames(mxd, "Traffic Analysis")[0]
time = df.time.currentTime
0 Kudos
RolandoRaqueño
New Contributor
Thanks Chris,

That looks like what I was looking for.

I should have had the foresight to use the search terms "time" "slider" "object". 

The search gives "DataFrameTime" as the first hit :-).


All for now.

Rolando
0 Kudos