I had a question last week, asking if there is any AutoLISP program to find a specific text and replace it with another text. I decided to answer the question by publishing this article, instead of replying the email. So more people can read the answer.
You don’t need AutoLISP to do that. If you go to annotate tab, in text panel, you can find a small search box. That’s probably why it’s not so easy to find.
We just need to type the word or phrase we want to find, then press enter.
You will see AutoCAD open search dialog box. AutoCAD will also zoom to first text it find.
Tips: you can open ‘find and replace dialog box’ by typing FIND [enter] in command line
Type what text you want to replace with then click replace. You can limit your searches to current space (model or layout), selected objects, or entire drawing.
More find options
Click button to expand the find dialog box. You can refine your search further by using these options.
Yes, it can find text in blocks or xref too. But it can’t find value in fields. I think it will be great to find values in field to, because sometimes we need to review fields values.
For additional information, we also have spell checker in AutoCAD.
It works almost the same with find and replace text, only here, we compare it to AutoCAD dictionary.
Is there a way to create a macro button that will automatically replace a string of text when selected with another string of text?
Maybe you can try Batch Find and Replace here?
Thanks for the advice on how to find-and-replace text. Your posting just saved me a lot of time.
Very useful. Thank you very much for the information
Thanks a lot. Very useful!
thanks edwin so much
great! thanks a lot, Edwin.
Edwin,
I need to find a MText 2 words on separate lines. Any advise?
I need to find text and then add a revision cloud where that next is. Do you know of a way to not have to exit and restart the find and replace tool each time to edit the drawing?
Unfortunately, there’s no option to do that.
Adding a Revision cloud around searched text is something you could solve in code but there is no native way to do it. As for closing the window each time you find the next one, I know that pain only too well. I am in the process of fixing that. Have a look at http://www.CADfindREPLACE.com – I hope to release it by the end of the year. Join in the conversation there and we will fix this thing.
Thanks so much.
Find does not work with fields?