STK X Send comments on this topic.
OnAnimUpdate Event (AgSTKXApplication)
See Also  Example
TimeEpSec
Current animation time (in Epoch Seconds).
Windows






Windows & Linux

Description

Occurs just before an animation update.

Syntax

[Visual Basic .NET]
Public Event OnAnimUpdate( _
   ByVal TimeEpSec As Double _
)

[C#]
public void OnAnimUpdate(
double TimeEpSec
);

[Managed C++]
public: void OnAnimUpdate(
double TimeEpSec
);

[Java]
public  onAnimUpdate(
double TimeEpSec
);

[Unmanaged C++]
public: HRESULT OnAnimUpdate(
double TimeEpSec
);

Parameters

TimeEpSec
Current animation time (in Epoch Seconds).

Remarks

You can use the OnAnimUpdate event to synchronize other displays with the STK X animation loop. You can use the STK X Application ExecuteCommand method to extract information from STK X.

Example

[Visual Basic .NET] Copy Code
Private Sub stkxApp_OnAnimUpdate(ByVal TimeEpSec As Double) _
                Handles stkxApp.OnAnimUpdate

    Me.StatusBar1.Panels(1).text = CStr(TimeEpSec) & " EpSec"

    Dim retList As AGI.STKUtil.AgExecCmdResult
    retList = stkxApp.ExecuteCommand("GetAnimTime *")

    If retList.Count > 0 Then
        Me.StatusBar1.Panels(2).text = FilterChars(retList(0))
    Else
        Me.StatusBar1.Panels(2).text = "N/A"
    End If

    retList = stkxApp.ExecuteCommand("AnimFrameRate *")

    If retList.Count > 0 And retList(0) > 0 Then
        Me.StatusBar1.Panels(3).text = FilterChars(retList(0)) & " fps"
    Else
        Me.StatusBar1.Panels(3).text = "N/A"
    End If

End Sub

See Also

© 2017 Analytical Graphics, Inc. All Rights Reserved.

STK 11.2.1 Programming Interface