Alarm Group Filter via Script

A forum devoted to the discussion of all topics having to do with scripting and other advanced programming using iX Developer.
Post Reply
nxen
Posts: 17
Joined: Wed Jan 16, 2013 3:18 am

Alarm Group Filter via Script

Post by nxen »

Hello there!

I have two (or more) Alarm Groups. Using code from scrap I created a script to filter the Alarm Viewer regarding the Group (button4 & button5). It works but I don't know how to "clear" (button6) the filter, so to display again all the Alarm list.

Can anyone help?

Code: Select all

//--------------------------------------------------------------
// Press F1 to get help about using script.
// To access an object that is not located in the current class, start the call with Globals.
// When using events and timers be cautious not to generate memoryleaks,
// please see the help for more information.
//---------------------------------------------------------------

namespace Neo.ApplicationFramework.Generated
{
    using System.Windows.Forms;
    using System;
    using System.Drawing;
    using Neo.ApplicationFramework.Tools;
    using Neo.ApplicationFramework.Common.Graphics.Logic;
    using Neo.ApplicationFramework.Controls;
    using Neo.ApplicationFramework.Interfaces;
	using System.Collections.Generic;
    
    
    public partial class Screen1
    {
	private List <string> alarmGroup1ToShow;
	private List <string> alarmGroup2ToShow;

		void Screen1_Opened(System.Object sender, System.EventArgs e)
		{
			alarmGroup1ToShow = new List<string>();
			alarmGroup1ToShow.Add("Group1"); 	
			alarmGroup2ToShow = new List<string>();
			alarmGroup2ToShow.Add("Group2"); 

		}
		
		void Button4_Click(System.Object sender, System.EventArgs e)
		{
			AlarmViewer.FilterAlarmView(true,false,true,false,alarmGroup1ToShow);
			Button4.Fill = System.Drawing.Color.Red;
			Button5.Fill = System.Drawing.Color.FromArgb(214,227,244);
		}			
		void Button5_Click(System.Object sender, System.EventArgs e)
		{
			AlarmViewer.FilterAlarmView(true,false,true,false,alarmGroup2ToShow);
			Button5.Fill = System.Drawing.Color.Yellow;
			Button4.Fill = System.Drawing.Color.FromArgb(214,227,244);	
		}			
		void Button6_Click(System.Object sender, System.EventArgs e)
		{
			
		}		
			
    }
}
Best Regards,
Nikos X

User avatar
Russ C.
Posts: 213
Joined: Thu Nov 16, 2017 3:32 pm
Contact:

Re: Alarm Group Filter via Script

Post by Russ C. »

Hello,

We understand that this is a very old post. If there is anyone who is still experiencing this or similar issues and require assistance, please visit us at https://www.beijerelectronics.us/en-US/ ... ___support or give us call at 801.708.6690.

Thank you.
Best regards,

Russ
(801) 708-6690
Technical Support
Contact Us

Beijer Electronics AB
http://www.beijerelectronics.us

Post Reply