Notepad++ Batch program find lines missing "..."



  • Hello guys,

    i got a .ptp with 2000 string looking like this:

    N0070 G18 G03 X-3.4602 I-.0569 K0.0 F35.4
    N0080 I.1137 K0.0
    N0090 X-3.3465 I.0569 K0.0
    N0100 G00 Y-.1181
    N0110 G03 X-3.4602 I-.0569 K0.0
    N0120 I.1137 K0.0
    N0130 X-3.3465 I.0569 K0.0
    N0140 G00 Y-.2362
    N0150 G03 X-3.4602 I-.0569 K0.0
    N0160 I.1137 K0.0
    N0170 X-3.3465 I.0569 K0.0

    i want to write a batch program, which finds the lines where there isnt G00, G01, G02, G03.
    and then go back 1 line and copy G00 or G01 or … into the line below.

    So for example:

    Line with N0080 because there is no G03, the goto line N0070 and copy G03 in line N0080

    Can anybody help me?

    Best regards,

    Sebastian Schmidt



  • @Sebastian-Schmidt

    it might be possible that a regex can help in such a case but you need to
    know where exactly the missing G0? needs to be placed but in general
    I would advise to learn a scripting language for solving such problems.
    I, of course, would advise to learn python. ;-)

    Cheers
    Claudia


Log in to reply