Request for Answer Clarification by
drcwks-ga
on
20 Apr 2006 19:42 PDT
Hello Maniac,
Sorry once again for the delay. Just getting back on the system.
Sorry I didn?t show a better example of what I needed. Your script did just
what I said I was wanting but I really need just one more step. I?m copying another
example that shows what your script did. It did delete ALL the random characters
After the semi-colon in the far right columns which is needed on ALL lines.
I failed to show that there are other lines between the LIN line and
what I?m after on the
Far left columns is to strip the OTHER Nxxx lines so the text is
pushed to the far left
like you did on the LIN line. Once again once the line numbers start
at N1 the could
increment all the way to N9999. Those are the characters I need to have removed
from the entire text file. I?m pasting below what your program
returned and added some
comments where I broke further into the program. As you can see the
LIN lines are just
what I needed but once again I need the other lines stripped free of
the Nxxx characters.
Let me know if you need a better example.I DID copy and paste what I
would like the results to be.
Thanks,
drcwks
Example follows??what your program returned.......
PART1
CUT1
DRILL4
N1 START DRILL
N2 PUSH4
N3 REV002
N4 STOP;NOTE RUN AT 100%
N5 STOP ;NOTE. TURN ON COOLANT
N6 SSS()
N7 XXX()
N8 OOO()
N9 START2(0)
N10 SPINDLE()
N11 DRIVETO(368)
LIN(368.660,0.000,-207.735,0.000,0.000,0.000)
LIN(368.660,0.000,-206.985,0.000,0.000,0.000)
N14 S(1,1,1)
N15 ;STOP(1,1)
LIN(368.660,0.000,-206.735,0.000,0.000,0.000)
N17 PART2(1)
N18 ;STOP(0,0)
N19 START(0,0,0)
LIN(368.660,0.000,-207.735,-0.002,0.000,0.000)
-----------------then later in the program-------------
--------------As you can see I still need to have N1, N2, N3--N19,
N54, N56,N60-N76 replaced with no spaces where N54 line would just
read DRILL(0).
line N56 would just read DRILL(0). N58 line would just read UPSET(0)....etc, etc.
Your script DID delete the random number AFTER the
-DRILL(0) so that part will still work. Before the line read DRILL(0) ;xyz745
so the random numbers after the semi-colon on ALL the lines---not just
on the LIN lines were deleted, which is exactly what I need.
N54 DRILL(0)
LIN(370.855,28.920,-200.827,23.337,-0.183,0.000)
N56 DRILL(0)
LIN(369.755,28.922,-200.830,23.322,-0.179,0.000)
N58 UPSET(0)
LIN(368.525,28.924,-200.834,23.306,-0.174,0.000)
N60 UPSET5(4)
LIN(368.525,27.260,-201.526,21.900,-0.151,0.000)
N62 DRILL()
LIN(367.295,28.925,-200.837,23.292,-0.168,0.000)
N64 USPET1(0)
LIN(366.065,28.926,-200.840,23.279,-0.162,0.000)
N66 SPINDLE3
LIN(364.965,28.928,-200.843,23.268,-0.157,0.000)
N68 LOCATE1(0)
LIN(364.024,28.929,-200.845,23.260,-0.153,0.000)
N70 DRILL_SLOW(0)
LIN(363.084,28.930,-200.848,23.251,-0.150,0.000)
N72 SPEED(0)
LIN(362.143,28.931,-200.850,23.244,-0.147,0.000)
N74 STOP(5)
LIN(361.202,28.932,-200.852,23.236,-0.144,0.000)
N76 CUT
LIN(360.262,28.933,-200.854,23.228,-0.141,
Here?s the output I need?.
PART1
CUT1
DRILL4
START DRILL
PUSH4
REV002
STOP;NOTE RUN AT 100%
STOP ;NOTE. TURN ON COOLANT
SSS()
XXX()
OOO()
START2(0)
SPINDLE()
DRIVETO(368)
LIN(368.660,0.000,-207.735,0.000,0.000,0.000)
LIN(368.660,0.000,-206.985,0.000,0.000,0.000)
S(1,1,1)
;STOP(1,1)
LIN(368.660,0.000,-206.735,0.000,0.000,0.000)
PART2(1)
;STOP(0,0)
START(0,0,0)
LIN(368.660,0.000,-207.735,-0.002,0.000,0.000)
DRILL(0)
LIN(370.855,28.920,-200.827,23.337,-0.183,0.000)
DRILL(0)
LIN(369.755,28.922,-200.830,23.322,-0.179,0.000)
UPSET(0)
LIN(368.525,28.924,-200.834,23.306,-0.174,0.000)
UPSET5(4)
LIN(368.525,27.260,-201.526,21.900,-0.151,0.000)
DRILL()
LIN(367.295,28.925,-200.837,23.292,-0.168,0.000)
USPET1(0)
LIN(366.065,28.926,-200.840,23.279,-0.162,0.000)
SPINDLE3
LIN(364.965,28.928,-200.843,23.268,-0.157,0.000)
LOCATE1(0)
LIN(364.024,28.929,-200.845,23.260,-0.153,0.000)
DRILL_SLOW(0)
LIN(363.084,28.930,-200.848,23.251,-0.150,0.000)
SPEED(0)
LIN(362.143,28.931,-200.850,23.244,-0.147,0.000)
STOP(5)
LIN(361.202,28.932,-200.852,23.236,-0.144,0.000)
CUT
LIN(360.262,28.933,-200.854,23.228,-0.141,