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.
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.
- Open a test application in InTouch WindowMaker.
- Create a new window, called AlarmTest.
- 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.
- 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.
- 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.
- Double click the Alarm Tree Viewer Control, and on the Control Name tab, enter MyAlarmTree as the Control Name.
- 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.
- For the Name of the script, enter â€œUpdateAlarmViewâ€.
- For the body of the script enter the following:
#MyAlarmViewer.AlarmQuery = #MyAlarmTree.GetAlarmQueryFromSelection();
- Press the Validate button to check for any errors, and then press OK.
- 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.