Professional Documents
Culture Documents
Controlling Animation Speed in Arcgis Tracking Analyst
Controlling Animation Speed in Arcgis Tracking Analyst
'SmoothAnimationforTrackingAnalyst
'Author:DanielOrellana
'Licence:CreativeCommonsBYSA
Subcustom_playback()
DimpiTrackingLayerAsITemporalLayer
DimpiMxDocAsIMxDocument
SetpiMxDoc=Document
IfTypeOfpiMxDoc.FocusMap.Layer(0)IsITemporalLayerThen
SetpiTrackingLayer=piMxDoc.FocusMap.Layer(0)
EndIf
IfpiTrackingLayerIsNothingThen
MsgBox"Error:AtemporallayerneedstobeatfitstplaceonTOC"
ExitSub
EndIf
DimpiTimeControlAsITimeControl
SetpiTimeControl=NewTimeControl
SetpiTimeControl.CurrentMap=piMxDoc.FocusMap
piTimeControl.SetVisibleApplication.hWnd,True
piTimeControl.SetTemporalReferencesFromMap
piTimeControl.TemporalMode=enumTemporalHistoric
piTimeControl.TimeSequenceRate=0.05'thetimeratevalue
If(NotpiTimeControl.Status=enumStopped)ThenpiTimeControl.Stop
piTimeControl.CurrentTime=piTimeControl.StartTime
piTimeControl.PlayenumDirection.enumForward
EndSub