Hi All,
What is the fastest way to find out the number of active elements attached to each Protocol please?
I need to audit the thousands of elements that we have on a list of drivers.
How can I do this very quickly please?
Rgds,
Mark
Hi Mark,
You should be able to create an automation script that uses the method GetElements to retrieve all elements in your system as a collection of IDmsElement and then in that object you have access to the State property to check whether they are active or not and then you can group by the Protocol property and count the resulting set.
IDms thisDms = engine.GetDms();
var activeElements = thisDms.GetElements().Where(e => e.State == ElementState.Active);
var groupByProtocol = activeElements.GroupBy(e => e.Protocol);
foreach (IGrouping<IDmsProtocol, IDmsElement> grouping in groupByProtocol)
{
engine.GenerateInformation($"{grouping.Key} -> {grouping.Count()}");
}
Thank you Joao.
I haven’t done this before & don’t have the time but will keep it in mind.
When I use the Advanced filter it shows all the elements that have say ‘DCM’ in the title.
Rather than the number of DCM elements.