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

AVEVA™ Operations Management Interface

Write an event handler script from the Layout script editor

Write an event handler script from the Layout script editor

  • Last UpdatedOct 10, 2024
  • 2 minute read

Event Handler scripts can be created with the Add New Script dialog box of the Layout script editor. Handled events can be selected for the Event list of the Add New Script dialog box.

Write an AlarmApp event handler script from the control Properties page

  1. Open the layout and show the items listed in the Toolbox tab.

  2. Select the AlarmApp from the Toolbox list to show its preview thumbnail.

    The Toolbox pathway to the AlarmApp is:

    _Default Content > 4. Apps > AVEVA OMI Apps > AlarmApp

  3. Drag and drop the preview thumbnail onto a layout pane.

  4. Select Script from the menu bar of the Layout editor to open the script editor.

  5. Create an event handler script.

    1. Within the Layout script editor, select the red plus circle to show the Add NewScript dialog box.

    2. Select Event Handler.

    3. Select the name of the AlarmControl placed on the layout pane from the Source list.

    4. Select the data field of Event to show a list of event handlers.

    5. Select one or more event handlers from the list.

    6. Select Add to close the Add New Script dialog box and return to the Layout script editor.

      The Event Handler Scripts area shows the selected event handlers in alphabetic order.

  6. Select an event handler from the list and enter script code for each event handler.

    The number of lines in each event handler script are shown in the Available Events property of the Layout editor.

  7. Validate your script code by selecting the validation button at the right on the menu bar above the script edit area.

  8. Save your scripts and exit from the Layout script editor.

    The new event handler scripts appears beneath the Event Handler Scripts area at the left of the editor and the window focus is set to the script edit area to begin writing script code.

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