Community

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

    How to rename blocks of a program in notepad ++?

    Help wanted · · · – – – · · ·
    3
    7
    4515
    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.
    • Rogério Ferreira
      Rogério Ferreira last edited by

      Hello everybody,

      I am using the notepad ++ to modify some cnc programs, so I have inserted some new blocks in one of this programs, then I would like to know how to rename the blocks automatically, is that possible?

      Claudia Frank fade2gray 2 Replies Last reply Reply Quote 0
      • Claudia Frank
        Claudia Frank @Rogério Ferreira last edited by

        @Rogério-Ferreira

        not quite sure what you are requesting, can you give as an example of
        what you have and what you want to have?

        Cheers
        Claudia

        1 Reply Last reply Reply Quote 0
        • Rogério Ferreira
          Rogério Ferreira last edited by

          Thank you in advance for your help.

          For example, I have the following blocks of a cnc program:

          N1400 G01 Z=R451+R90 F=500 ;COTA Z PISTA SUPERIOR
          N1410 STOPRE
          N1420 M92 ;RESET ANALOGICAS PIST NOVA

          and I want to introduce two new blocks (lines) and rename automatically all blocks in ascending order, for example:
          N1400 G01 Z=R451+R90 F=500 ;COTA Z PISTA SUPERIOR
          N1410 STOPRE
          N1420 G04 F10 ; (NEW BlOCK)
          N1430 STOPRE ; (NEW BLOCK)
          N1440 M92 ;RESET ANALOGICAS PIST NOVA

          Claudia Frank 1 Reply Last reply Reply Quote 0
          • Claudia Frank
            Claudia Frank @Rogério Ferreira last edited by

            @Rogério-Ferreira

            out of the box - this could be, better I should say I assume this could be, achieved with some heavy regular expressions but
            when installing a npp scripting language plugin like python, java script, lua etc… we could find a way to automate this.

            Cheers
            Claudia

            1 Reply Last reply Reply Quote 0
            • Rogério Ferreira
              Rogério Ferreira last edited by

              @Claudia-Frank

              I thought It was easier, I thought It was already a notepad ++ resource.

              Thank you again.

              Claudia Frank 1 Reply Last reply Reply Quote 0
              • Claudia Frank
                Claudia Frank @Rogério Ferreira last edited by

                @Rogério-Ferreira

                there is one other solution which maybe suits you.
                With holding alt+shift you can use the arrow keys to select a block of text, alt+left mouse is the same.
                Once done, pressing alt+c opens the block editor mode and there you can insert numbers with a defined stepping.

                Cheers
                Claudia

                1 Reply Last reply Reply Quote 0
                • fade2gray
                  fade2gray @Rogério Ferreira last edited by

                  @Rogério-Ferreira

                  Short video clip may help https://youtu.be/8p4S8vsEjRo

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