Rotating a GroupTo rotate a group using scripting, please use the following preferred method listed in the steps below. To rotate a group using scripting:
Example: Rotating a Group Using a ScriptDim bUp As Boolean
Private Sub CFixPicture_Initialize() bUp = True CommandButton1.Caption = "Rotate Up" End Sub
Private Sub CommandButton1_Click() Dim o As Object Dim dVal As Double
' get the variable object, using FindObject ' to keep group out of VBA Set o = Me.FindObject("RotationAngle")
' get the current value of the variable dVal = o.CurrentValue
If bUp Then ' increment the value dVal = dVal + 5
' if we hit 45 then rotate down next time If dVal = 45 Then bUp = False CommandButton1.Caption = "Rotate Down" End If Else ' decrement the value dVal = dVal - 5
' if we hit 0 then rotate up next time If dVal = 0 Then bUp = True CommandButton1.Caption = "Rotate Up" End If End If
' set the current value of the variable object ' which will result in rotating the group o.CurrentValue = dVal
End Sub See AlsoConnection Example: Animating the Rotation of a Rectangle How Do I... |
Important Notice You do not have the latest version of iFIX! You are missing out on the newest capabilities and enhanced security. For information on all the latest features, see the iFIX product page. For more information on upgrades, contact your GE Digital sales agent or e-mail [email protected]. For the most up-to-date documentation, go here. |