DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

group count

Solved!
Go to solution

Hi,

Does anyone know if there is a function to calculate the amount of Groups? I know there is one to calculate the amount of channels: ChnNoMax but I can't find one to calculate the amount of groups

Basically what I want to do is to erase all the groups in the data portal to start with an empty data portal. For this, the only function I know is: "Data.Root.ChannelGroups.Remove(groupnumber)" and I want to use it in a For loop but for this I need to know the last value of the For Loop which is the number of groups...

 

Thanks 

0 Kudos
Message 1 of 5
(6,978 Views)
Solution
Accepted by topic author Leillo

Hi Leillo,

 

To count the number of channel groups use

 

Data.Root.ChannelGroups.Count

 

Please play a bit with the Data-API we implemented in DIAdem. It contains all data you see in the Dataportal. You can also have a look at the DIAdem script example. Most of them use it.

 

Greetings

Walter

Message 2 of 5
(6,975 Views)

Thanks

0 Kudos
Message 3 of 5
(6,959 Views)

Please use

data.Root.Clear

 to start with an empty portal and do not loop over all groups.

Message 4 of 5
(6,945 Views)

Even better, thank you

0 Kudos
Message 5 of 5
(6,938 Views)