2009-10-13 02:10 PM
2009-10-14 02:44 PM
!--> file names added f1= "ARMDATA.txt" ch1 = open ("TEXT", f1, "separator = 'K'; mode = ro,LIBRARY" ) n = input (ch1, 1, 1, var1,var2,var3) i = 1 while n > 2 do ADDX var1/1000 ADDY var2/1000 ROTX 90 CYLIND 12, var3/1000 ROTX 270 add -abs(var1/1000)-abs(var3/1000), -abs(var2/1000), 0 i = i+1 n = input (ch1, i, 1, var1,var2,var3) endwhile close ch1HTH,
2009-10-14 04:39 PM
2009-10-15 10:55 AM
ztaskai wrote:That not so works well, as I thought.
Hi,
Your script has two fundamental problems.
- The 'K' separator should be passed to the 'OPEN' command.
- The 'INPUT' command need a proper row number to read.
I created the following equivalent script but seeing the result I doubt that this is what you aim for.
!--> file names added f1= "ARMDATA.txt" ch1 = open ("TEXT", f1, "separator = 'K'; mode = ro,LIBRARY" ) n = input (ch1, 1, 1, var1,var2,var3) i = 1 while n > 2 do ADDX var1/1000 ADDY var2/1000 ROTX 90 CYLIND 12, var3/1000 ROTX 270 add -abs(var1/1000)-abs(var3/1000), -abs(var2/1000), 0 i = i+1 n = input (ch1, i, 1, var1,var2,var3) endwhile close ch1HTH,
Zsolt
!--> file names added f1= "ARMDATA.txt" ch1 = open ("TEXT", f1, "separator = 'K'; mode = ro,LIBRARY" ) n = input (ch1, 1, 1, var1,var2,var3) IF var1=30.00 THEN CYLIND 10,0.006 IF var2=62.00 THEN CYLIND 10,0.006 IF var3=5757.13 THEN CYLIND 10,0.006 close ch1
2009-10-16 12:33 PM
Alexonus wrote:Well, since you defined K as a separator and you begin your data lines with a K, the first value read is an empty string which is converted to 0.
That not so works well, as I thought.
I did a verification script, but a condition malfunctions....!--> file names added f1= "ARMDATA.txt" ch1 = open ("TEXT", f1, "separator = 'K'; mode = ro,LIBRARY" ) n = input (ch1, 1, 1, var1,var2,var3) IF var1=30.00 THEN CYLIND 10,0.006 IF var2=62.00 THEN CYLIND 10,0.006 IF var3=5757.13 THEN CYLIND 10,0.006 close ch1
2009-10-19 08:17 AM
2009-10-19 09:18 AM
2009-10-19 09:43 AM
2009-10-20 10:48 AM
2009-10-20 02:55 PM
Alexonus wrote:Alexonus:
How to set the thickness of lines?
LINE2 x1, y1, x2, y2