vizrtexample

Trigger Dynamic Scene

Jun 2nd, 2022 (edited)
172
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Dim sceneId As String
  2. Dim textureId As String
  3. Dim imageId As String
  4.  
  5. Sub OnInitParameters()
  6.     RegisterParameterString("path", "Path/UUID", "", 50, 300, "")
  7.     RegisterPushButton("load", " Load ", 0)
  8.     RegisterPushButton("clear", " Clear ", 1)
  9.     RegisterPushButton("restart", " Restart ", 2)
  10.     RegisterPushButton("start", " Start ", 3)
  11.     RegisterPushButton("continue", " Continue ", 4)
  12. End Sub
  13.  
  14. Sub OnExecAction(buttonId As Integer)
  15.     textureId = this.System.SendCommand("#" & this.VizId & "*TEXTURE GET")
  16.     imageId = System.SendCommand(textureId & "*IMAGE*OBJECT_ID GET")
  17.     Select Case buttonId
  18.         Case 0
  19.             System.SendCommand(imageId & "*DYNAMIC*SUBSCENE*TYPE SET OTHER")
  20.             System.SendCommand(imageId & "*DYNAMIC*SUBSCENE*SCENE SET " & GetParameterString("path"))
  21.         Case 1
  22.             System.SendCommand(imageId & "*DYNAMIC*SUBSCENE*SCENE CLEAR")
  23.         Case 2
  24.             sceneId = System.SendCommand(imageId & "*DYNAMIC*SUBSCENE*SCENE GET")
  25.             System.SendCommand(sceneId & "*STAGE SHOW 0.0")
  26.         Case 3
  27.             sceneId = System.SendCommand(imageId & "*DYNAMIC*SUBSCENE*SCENE GET")
  28.             System.SendCommand(sceneId & "*STAGE START")
  29.         Case 4
  30.             sceneId = System.SendCommand(imageId & "*DYNAMIC*SUBSCENE*SCENE GET")
  31.             System.SendCommand(sceneId & "*STAGE CONTINUE")
  32.     End Select
  33. End Sub
Add Comment
Please, Sign In to add comment