05-12-2010 09:09 AM
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
05-13-2010 10:50 PM
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.CountMsg = Msg & Channels(i).Properties("groupindex").Value & vbCRLF
NEXT ' i
MsgBox Msg
Brad Turpin
DIAdem Product Support Engineer
National Instruments
07-28-2016 09:06 AM
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***")