DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Find text in channel values

Hi,

When searching for values in channels I would normally use the following code:

R1 = -0.2
L1=Find("Ch('Metrics/X Data')>=R1")

 

However, I now need to search for some text within the values of a text channel. I have tried the following but it doesn't seem to work:

T1 = "HW Grad [deg/g]"
L1 = Find("Ch('Metric Values/Metrics')= T1", 1)

 

The help files give the following example as an alternative method:

ChnFind("instr(1,ch(""Group1/Textchannel""),""meas"",1)<>0")

 

However, I was wondering why my first attempt didn't work and whether there is a method that is similar to my Find version that doesn't rely on InStr?

Thanks, Simon.

 

0 Kudos
Message 1 of 2
(2,163 Views)

Hi Simon,

 

Honestly I would mostly follow the examples. They might be a bit trickier but I guess that they show optimized way to get to what you want. But if you want a really simple version you can use that :

 

T1 = "Arithmetic mean"
L1 = PNo("[3]/StatisticsText", T1)
CLAMaxime -- Kudos are a great way to say thank you
0 Kudos
Message 2 of 2
(2,144 Views)