Skip to main content
InSource Solutions

TN IT101 Alarm TreeView control

insource logo large.jpg

TECH NOTE

 

Description

The AlarmTreeViewerCtrl in InTouch is an ActiveX that doesn't get used very often. This document explains how to use it and it's purpose.

 

  • Author: Dillon Perera
  • Published: 09/23/2014
  • Applies to: InTouch Classic

How and When to Use this Guide

Many users are unsure of how and why to use the AlarmTreeViewerCtrl. This is because unlike many other Alarm Controls in InTouch, the Alarm Tree View doesn't do anything unless you add scripting. The Alarm Tree Viewer lets you see the alarm groups, and select them, allowing you to have it update the alarm query used in InTouch alarm controls.

Instructions

This solution will walk through creating an example window which uses the Alarm Tree Viewer Control. It will allow the user to click on an alarm group within the Alarm Tree Viewer and have it update the alarm query of the Alarm Viewer Control so that only alarms from specific Alarm Groups are shown.


Steps:

  1. Open a test application in InTouch WindowMaker.
  2. Create a new window, called AlarmTest.
  3. Go into the Wizards and from the ActiveX Controls list select the AlarmViewerCtrl, and place this on your InTouch window. This will show us the alarms that we select to view.
  1. Double click on the Alarm Viewer Control, and on the Control Name tab, enter MyAlarmViewer a the Control Name. Hit OK to close the configuration screen.
    AlarmTreeViewer_ViewerControlName.JPG
  2. Go in to the Wizards again, and from the ActiveX Controls list select the AlarmTreeViewerCtrl, and pace this on your InTouch window beside the Alarm Viewer Control we added previously.
  3. Double click the Alarm Tree Viewer Control, and on the Control Name tab, enter MyAlarmTree as the Control Name.
    AlarmTreeViewer_TreeControlName.JPG
  4. Go to the Events tab of the Alarm Tree Viewer and then click on the entry for “Click”, then double click in the Script section of that line. A new Script window will be displayed.
  5. For the Name of the script, enter “UpdateAlarmView”.
  6. For the body of the script enter the following:
    #MyAlarmViewer.AlarmQuery = #MyAlarmTree.GetAlarmQueryFromSelection();
    #MyAlarmViewer.Requery();
    AlarmTreeViewer_Script.JPG
  7. Press the Validate button to check for any errors, and then press OK.
  8. Now go to runtime, and you will be able to see all of your Alarm Groups in the Alarm Tree Viewer. You will also now be able to click on any of the groups and have the Alarm Viewer update to only show you alarms from that Alarm Group.