DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Function to count the total number of data channels

Solved!
Go to solution

I know I had stumbled upon a function in DIAdem that will return the current number of data channels in my data set.  I can't seem to locate the thread where I had seen this.  I'm looking to replace a somewhat lengthly user script with this simple function in my future coding.

 

Thanks!

0 Kudos
Message 1 of 3
(5,722 Views)

Hello CrshTstr,

 

There are probably multiple ways to get this, but the variable

 

ChnNoMax

 

is one way to find out how many channels are used in DIAdem. I don't knowif that is what youwere refering to when you said"in my data set", so I am assuming you mean "in DIAdem".

 

Hope that helps,

Otmar D. Foehner
0 Kudos
Message 2 of 3
(5,717 Views)
Solution
Accepted by topic author CrshTstr

Hi CrshTstr,

 

I actually always use GlobUsedChn for this.  In newer versions of DIAdem you can use commads like GroupChnCount() or Data.Root.ChannelGroups(1).Channels.Count to return the number of channels in a particular group.  But the GlobUsedChn variable will always return the total number of channels currently in the Data Portal, irrespective of what group the channels are in.

 

Brad Turpin

DIAdem Product Support Engineer
National Instruments

Message 3 of 3
(5,698 Views)