DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Get channels in DIAdem 10.1

Solved!
Go to solution
Hello 
I want to iterate through all channels in the active group.
I wrote this code in DIAdem 11.1:

Dim maxLen

Dim Channel

For Each Channel in Data.Root.ActiveChannelGroup.Channels

If maxLen < Channel.Size Then

maxLen = Channel.Size

End If

Next

 

Unfortunately, this script should run on a DIAdem 10.1.

DIAdem 10.1 has a problem with the Data-Object.

I only have DIAdem 11.1 and I need a Script which runs on a DIAdem 10.1.

 

Does anybody know how I can get all Channels from one Group in DIAdem 10.1?

 

Thanks

0 Kudos
Message 1 of 3
(3,957 Views)
Solution
Accepted by topic author Züger

Hi Zueger,

 

The Data object was introduced in DIAdem 11.0, so here's how you can write the code to loop through all the channels of the default group in DIAdem 10.x or earlier:

 

Dim j, maxLen, ChNum

For j = 1 TO GroupChnCount(GroupDefaultGet)

  ChNum = CNoXGet(GroupDefaultGet, j)

  maxLen = MinV(maxLen, ChnLength(ChNum))

Next ' j

 

 

Brad Turpin

DIAdem Product Support

National Instruments

0 Kudos
Message 2 of 3
(3,953 Views)
It works perfectly. Thank you very much!
0 Kudos
Message 3 of 3
(3,934 Views)