Changing a Variable Object's Current Value

This example shows you how to write a script that changes a Variable object's current value when clicking text at run time.

To change a Variable object's caption:

  1. Create a Variable object.
  2. Change the object's type to Long.
  3. Create a Text object.
  4. Using the Animations dialog box, animate the Text object's Caption using the Variable object's CurrentValue property as its data source.
  5. Right-click the Text object and select Edit Script from the pop-up menu.
  6. Enter the following code in the Text object's Click event:

Variable1.CurrentValue = Variable1.CurrentValue + 10

  1. Switch to the run-time environment and click the Text object.

    The caption of the Text object increments by 10 (as will the Variable's current value).

See Also

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.