05-11-2007 11:07 AM
05-11-2007 11:36 AM
Hi Julia,
here is a brute force solution:
Dim NewArray, NewChns
NewChns = "NewChannelName" : NewChns = Split(NewChns, "|")
NewArray = "1|2|3|4|5" : NewArray = Split(NewArray, "|")
Dim i
For i = 0 To UBound(NewArray)
NewArray(i) = CDbl(NewArray(i))
Next
Call ArrayToChannels(NewArray, NewChns)
' Results in numeric channel
May be that helps,
Christian
05-11-2007 11:38 AM
Hi Christian,
Thanks for the speedy reply - unfortunately that is very similar to what I am already doing, and I was hoping for something better. But if this is the only way, this is how it will have to be!
Thank you again,
Julia
05-11-2007 12:57 PM
Obviously, it is sufficient to set the data type of the first array element to double:
NewArray(0) = CDbl(NewArray(0))
Call ArrayToChannels(NewArray, NewChns)
Christian
05-11-2007 01:05 PM
05-11-2007 04:20 PM
Matthias Alleweldt Project Engineer / Projektingenieur | Twigeater? |
05-14-2007 08:39 AM
Hi All,
Another possibility in DIAdem 10.1 or later is to use the new ChnCalculate() command:
Call ChnCalculate("Ch(""[1]/Name"") = CDbl(Ch(""[1]/Name"")))
But I think Christian's suggestion is the most efficient,
Brad Turpin
DIAdem Product Support Engineer
National Instruments
05-14-2007 08:48 AM
Matthias Alleweldt Project Engineer / Projektingenieur | Twigeater? |