Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ Operations Management Interface

Configure an event handler script

  • Last UpdatedDec 06, 2024
  • 3 minute read

When you add an Event Handler script and select the script name from the list of scripts on the Script tab, the app name, event, and parameters associated with the event are shown in a grid at the top of the page, above the script editing area.

Event handler script configuration

Number 1

App/Control Name

Number 2

Event Name

Number 3

Parameter Grid

Number 4

Script Editing Area

In the parameter grid, you can change the order in which the parameters are shown by clicking on either of the column headers. Parameters can be shown in ascending or descending order by name or type.

All public events, methods, and .NET dependency properties are exposed for apps that are compiled against the current version of the SDK. If an app was compiled against a previously released version of the SDK, only .NET dependency properties are exposed.

When you create an Event Handler script, the event name appears in bold in the list of available events.

To configure an event handler script

  1. To change a parameter name, select its name in the parameter grid and enter a new name.

  2. Enter your script in the main edit box. You can directly access properties and methods that belong to the app/control, without using the MyContent namespace .Autocomplete helps by displaying valid items, based on the initial characters you enter.

    • You can validate your script for syntax errors prior to saving by pressing the Validate Script Validate Layout Script icon button.

    • To clear all data entered for the the script, including the expression, press the Clear Script Clear Layout Script icon button. There is no undo for this action.

  3. To save the script, select the Save Save Layout icon or Save and Close Save and Close Layout icon button.

  4. The script is validated automatically. If there are warnings or errors generated, a dialog listing the errors is displayed. You have the following options:

    • Select Yes to save the script and preserve the errors.

    • Select No to discard the changes you made to the script. If you selected Save and Close, the Layout editor closes and you will lose any changes you made to the script. If you selected Save, the Layout Editor remains open and you can resume editing the script.

    • Select Cancel to resume editing the script. The Layout Editor remains open and you can resume editing the script.

Event handler script limitations

The events for existing custom apps that were compiled against an older version of the AVEVA OMI SDK are filtered, and only .NET dependency properties will be exposed for event scripting. This ensures that public properties that may not have been intended to be used for scripting cannot be used this way.

Do not create event handlers for events that occur during, or shortly after, the creation of the app instance or short. For example, do not create an event handler for the "Initialized" event.

Do not create event handlers for touch events. These will not be executed at runtime.

TitleResults for “How to create a CRG?”Also Available in