Navigation

    Community

    • Login
    • Search
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

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

    Help wanted · · · – – – · · ·
    find and add
    2
    2
    1412
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Sebastian Schmidt
      Sebastian Schmidt last edited by

      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

      Claudia Frank 1 Reply Last reply Reply Quote 0
      • Claudia Frank
        Claudia Frank @Sebastian Schmidt last edited by

        @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

        1 Reply Last reply Reply Quote 1
        • First post
          Last post
        Copyright © 2014 NodeBB Forums | Contributors