AlarmViewer - filter by script

A forum devoted to the discussion of all topics having to do with scripting and other advanced programming using iX Developer.
Post Reply
Joe
Posts: 27
Joined: Tue Sep 18, 2012 4:53 am

AlarmViewer - filter by script

Post by Joe »

Hi,

Can I set filter to alarm groups in AlarmViewer using the script.

For example, I need -> AlarmGroup1 - set "Enabled" - ON, set "Normal" -OFF ...

Thanks for reply

Regards

Joe

User avatar
Edmund
Posts: 92
Joined: Thu Nov 29, 2012 2:27 pm

Re: AlarmViewer - filter by script

Post by Edmund »

Here is a example with two buttons (show all, show only active).

Code: Select all

    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 AlarmScreen
    {	
		
		private List<string> alarmGroupsToShow;
		
		void AlarmScreen_Opened(System.Object sender, System.EventArgs e)
		{
			alarmGroupsToShow = new List<string>();
			alarmGroupsToShow.Add("Default"); 
		}
		
		
		void btnShowAll_Click(System.Object sender, System.EventArgs e)
		{
			AlarmViewer1.FilterAlarmView(true,true,true,true,alarmGroupsToShow);
		}
		
		void btnOnlyActive_Click(System.Object sender, System.EventArgs e)
		{
			
			AlarmViewer1.FilterAlarmView(true,false,false,false,alarmGroupsToShow); 
		}
	}
}	
Best Regards
Edmund Andersson

AITECH AB

Part of Beijer Integrator Group

kim
Posts: 15
Joined: Fri Feb 03, 2012 11:38 am

Re: AlarmViewer - filter by script

Post by kim »

Hi.

I read this and it was helpful to me. I am not so skilled in scripting so I want to ask for some help.

I have two questions:
1. Additional to these functions to filter one group only, I also want a button that enables all groups to be shown, or more than one group. How to do this?
2. What settings does the "true,false, true...." represent? (something about Normal, Ack...)

Thank you,
Kim

Post Reply