DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Does wildcards work with channel names?

Hi,

 

I´m trying to use the wildcard "*" in the name of channel to get its index.

I have the channels:

Filtered - b00 - Axial MGT

Filtered - b01 - Axial ME

Filtered - b03 - Radial MGT ...

 

The begin of the channel name is always the same, but the end is undefined.

 

I´m trying to use this line, but I get the msg "The index Filtered - b00* does not match any elements in the list."

Data.Root.ChannelGroups(1).Channels("Filtered - b00*").Properties("groupindex").Value

 

Plz

Help

0 Kudos
Message 1 of 3
(3,898 Views)

Hi Lawrence,

 

You can't use a wildcard in the Channels collection that way, because there could be more than one channel with that name... which group index should DIAdem return if there is a channel named that way in each of the 3 groups in the Data Portal?

 

Instead, use the GetChannel or GetChannels method:

 

Set Channels = Data.GetChannels("Filtered - b0*")

FOR i = 1 TO Channels.Count

  Msg = Msg & Channels(i).Properties("groupindex").Value & vbCRLF

NEXT ' i

 

MsgBox Msg

 

Brad Turpin

DIAdem Product Support Engineer
National Instruments

0 Kudos
Message 2 of 3
(3,880 Views)

Hello Brad,

 

If I have a channel that changes positions and I just want that channel, is there a way to use a wild card for just those specified channels?

For i = 1 To GroupCount

 

 

Call Area.DisplayObj.Curves2D.Add("[1]/Timesec","["&i&"]/U_FREXG****")

Call Area2.DisplayObj.Curves2D.Add("[1]/Timesec","["&i&"]/B1COHb***")

 

 

0 Kudos
Message 3 of 3
(3,150 Views)