BuildAlarmMenu
When a user right-clicks on the Alarm Banner, Geo SCADA Expert displays a context-sensitive menu. The options that are shown on this menu are either the default menu options or are the default options plus additional options that you have defined in an Alarm Banner script. However, Geo SCADA Expert can only call the functions that define the additional options if the AlarmBanner.AddMenuItem function is used to enable users to access those functions from the Alarm Banner's context-sensitive menu, and if the Alarm Banner script first calls the BuildAlarmMenu function. For this reason, you need to include the BuildAlarmMenu function in your Alarm Banner scripts and it has to be defined before you define any AlarmBanner.AddMenuItem and AlarmBanner.AddMenuSeparator Alarm Banner functions.
The BuildAlarmMenu function is different to the other Alarm Banner functions as it does not reference the Alarm Banner object. This means that there is no special syntax required - you simply need to define the start of the function by using Function BuildAlarmMenu
and define the end of the function by using End Function
. Between the start and end of the BuildAlarmMenu function, you can use a combination of the AlarmBanner.AddMenuItem and AlarmBanner.AddMenuSeparator Alarm Banner functions to specify the names of the options to be added to the AlarmBanner menu and the names of the functions that they will call.
For an example of how you can use the BuildAlarmMenu function in a script, see Example 1: Extracting Alarm Information from the Alarm Banner in ViewX.
Any alarm options that you add to the context-sensitive menu for the Alarm Banner or Alarms List are available in ViewX and Virtual ViewX only.