DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

How to get channel Index

Solved!
Go to solution

Hello DIAdem Users,

 

I want to look for a particular string in the Channel's name and once I find that string in a channel'sname then I want to have its index. How can I achieve that?

 

 

Regards

0 Kudos
Message 1 of 3
(5,281 Views)
Solution
Accepted by Sarry
Option Explicit

dim groupObj : for each groupObj in data.root.ChannelGroups
  dim chObj : for each chObj in groupObj.channels
    if 0 <> inStr(1, chObj.Name, "ei", vbTextCompare) then
      MsgBox chObj.Name & " " & chObj.ChannelGroup.Properties("index").Value & " " & chObj.Properties("groupindex").Value
    end if
  Next
Next

 

To determine the code to read such properties, you can just drag and drop it from property window into script.

0 Kudos
Message 2 of 3
(5,279 Views)

Thank you!!!

0 Kudos
Message 3 of 3
(5,262 Views)