DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Invalid numeric entry

Solved!
Go to solution

Hi,

I need to create a new channel with only a portion of data.

I want to use the command : ChnTimeAreaCopy but I get always the same error : Invalid numeric entry

 

my code is

 

Dim myvalue02

myvalue02 = str(chd(ChnFind("Ch(""[2]/velocity"")<0",1),"[2]/Time"),"d.ddd")

Call ChnTimeAreaCopy("[2]/Time","[2]/Displacement","[2]/Time_enj","[2]/Displacement_enj",0,myvalue02) '... XW,Y,E,E,TimeAreaCopyBeg,TimeAreaCopyEnd 

 

my intention is to assign to myvalue02 the value of Time channel when the "velocity" channel i less than 0  (first value)

Then I want to create  new channels "Displacement_enj" and "Time_enj" with only a portion of data between Time =0 and Time = myvalue02.

 

I suppose the problem is that myvalue02 is a text value.

How can I convert to numeric value?

 

0 Kudos
Message 1 of 3
(4,121 Views)
Solution
Accepted by topic author Giova

Hello Giova 🙂

 

Yes, you are right, you assigned myvalue02 as a string, while ChnTimeAreaCopy(XW, Y, E, E, TimeAreaCopyBeg, TimeAreaCopyEnd) should be a real variable.

 

By writing

myvalue02 = val(myvalue02)

you will convert your string into a numeric.

Try to write it after your second line where you declare myvalue02 and I think you will not be receiving the same error any more.

Antonios
0 Kudos
Message 2 of 3
(4,092 Views)

Thanks!

0 Kudos
Message 3 of 3
(4,084 Views)