Object Availability in the VB Editor

The following steps describe how to make a single object available in the VB Editor.

To make a single object available in the VB Editor:

  1. Select the object in the picture.
  2. Select Edit Script from the right-click menu.

To make a group of objects available in the VB Editor:

  1. Select the group of objects in the picture.
  2. Select Enable Scripts from the right-click menu.

NOTE: When you select Enable Scripts, iFIX adds the objects to the VBA project, but does not start the VB Editor. Objects that are visible, such as rectangles and ovals, are not automatically available in the Editor.

For optimization purposes, if you choose not to tie a script to the object, it does not remain available after you close the picture. You will have to select it again in the picture and add the objects to the VBE if you want to use them in a script.

You can, however, forward-reference objects that are not available in the VBE. For example, you can write a script tied to Rect1 that references Oval1, as shown in the following example:

Oval1.Visible = False

The above code is acceptable even when Oval1 is not available to the VBE. The only difference in the VBE between objects that are available and objects that are not available is that the list of properties and methods available to the object appear when you type the period (.) after available objects. When forward-referencing objects, the objects will be added to the project when the picture is closed or saved.

The following objects are always available in the VBE:

  • Timer objects
  • Event objects
  • Buttons
  • Dynamos
  • ActiveX controls
  • Variables
  • Any objects that have been added to the Global page

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.