Hi
I trying to write a procedure that can extract numbers from a text file, then multiple that value * 2, then parse
the new value back into the text file.
Example of text file ( ORIGINAL )
N1G90G81X-5.75Y1.5Z-.25R.01F2.5
N2X-3.832Y.25
N3Y-1.916Y.35
N4X0Y.45
N5X1.916Y.55
N6X3.832Y.7546
N7X5.75Y1.345
Example of the results needed ( Modified X values)
N1G90G81X-11.5Y1.5z-.25R.01F2.5
N2X-7.664Y.25
N3X-3.832Y.35
N4X0Y.45
N5X3.832Y.55
N6X7.664Y.7546
N7X11.5Y1.345
I have no problem extracting the X values from each line
Example for line N3 X_Value = "-3.832"
The problem is I do not know how to convert this string to a value that can be multiplied * 2
The Val function will convert the string to a number but does not handle the decimal point.
Any help will be appreciated
Mike
I trying to write a procedure that can extract numbers from a text file, then multiple that value * 2, then parse
the new value back into the text file.
Example of text file ( ORIGINAL )
N1G90G81X-5.75Y1.5Z-.25R.01F2.5
N2X-3.832Y.25
N3Y-1.916Y.35
N4X0Y.45
N5X1.916Y.55
N6X3.832Y.7546
N7X5.75Y1.345
Example of the results needed ( Modified X values)
N1G90G81X-11.5Y1.5z-.25R.01F2.5
N2X-7.664Y.25
N3X-3.832Y.35
N4X0Y.45
N5X3.832Y.55
N6X7.664Y.7546
N7X11.5Y1.345
I have no problem extracting the X values from each line
Example for line N3 X_Value = "-3.832"
The problem is I do not know how to convert this string to a value that can be multiplied * 2
The Val function will convert the string to a number but does not handle the decimal point.
Any help will be appreciated
Mike