DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

problems with variable types / Problem mit Variablentypen

hallo!
this is what I created:
 
        intLoop = 15
        i = 16
        MeinStr = "Matrix_3V_li_Z" & i &"(" & intLoop & ")"        '= Matrix_3V_li_Z16(15)
        L1 = MeinStr                                                                   'Matrix_3V_li_Z16(15) = 7 ; so I want L1 to become 7
the problem is that the script wants to set the text "'Matrix_3V_li_Z16(15)" on L1, error of course
but 'Matrix_3V_li_Z16 is a vector variable I created, and I want the value of Matrix_3V_li_Z16(15) for example.
 
thanks
philipp
0 Kudos
Message 1 of 3
(3,349 Views)
Hello Philipp,

You can use the function Chd or  ChdX to read values out of a channel. (Please have a look to the DIAdem help for more infos to this functions.)
In your case this looks like the following:

intLoop = 15
i = 16
MyVar = chd(intLoop, "Matrix_3V_li_Z" & Str(i))

Greetings
Walter
0 Kudos
Message 2 of 3
(3,347 Views)
 
that was the missing link --> Str(i)    Smiley Very Happy
 
thank you
 
0 Kudos
Message 3 of 3
(3,344 Views)