Find and replace form command line / lisp

Lamer question. Is some simple way how change from command line text contents.

ie. I need replace in singleline text string "AAA" to "BBB".

Comments

  • Hi Juraj,

    If you dont't mind using a small tool to help you with your task, you can try our GeoTools software.

    Download link: www.coordsys.com/geotools

    Look under Block Tools -> Search and replace text/attributes. You can search, replace and optionally zoom to each text while doing so , thereby verifying if indeed everything is happening correctly or not.

    Regards
    Rakesh Rao
    Blog: http://rakeshrao.typepad.com

     

  • I try it, but it's "same" as is in BricsCAD ...for me.

    What I want do... I want/need create LISP script as I have for layers / colors, when ie. I select entity which is in layer "1", type LAYER2, it's execute my script and change selected entity to to layer "LAYER2".

    I want make simmilar command/script, but for TEXT. When I have select text string (ie. "AAA BBB CCC"), type ABC, and it edit/clear and insert new content, ie. "ABC". Or it find and replace "content1" -> "content2".

     

    Something like - very simplified example:

    (defun C:ABC ()

           (command    "_REPLACE" "AAA" "BBB" "")
      )

  • Found it: CHANGE -> Change point -> ... -> NEW TEXT.

This discussion has been closed.