The Hurricane Forum
The Hurricane Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 AutoCAD
 Lisp & Other Handy Files
 Search and Replace Text (in Attributes too)
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

BK
Super User

36 Posts

Posted - April 23 2003 :  1:34:25 PM  Show Profile  Visit BK's Homepage  Reply with Quote
Here is a really good lisp routine by Thomas Berger.

It allows you to specify a string (partial strings DON'T need ? and * characters), and a replacement string, it searches the entire drawing and does the replacement.

So if you want to replace ROOF4-TILE with ROOF-TILE then just run GSR and enter ROOF4 at the first prompt, and ROOF at the second.

For those of you with lots of wrong text inside block attributes, this routine can be a lifesaver.

Download Attachment: GSRLSP.ZIP
2.8 KB

BK

anto1
New Member



11 Posts

Posted - November 08 2005 :  09:02:46 AM  Show Profile  Visit anto1's Homepage  Reply with Quote
Hi, BK,
I tried this routine and it is very good, do you know a script with the same function?
Go to Top of Page

Admin
Administrator



652 Posts

Posted - November 08 2005 :  10:37:04 AM  Show Profile  Visit Admin's Homepage  Reply with Quote
Hi anto1,

Here is how you would use the above lisp within a script to perform the above procedure...
(lisp location may vary)

; begin script
(LOAD "C:/PROGRAM FILES/AUTOCAD 2000I/SUPPORT/GSR.LSP")
GSR
ROOF4
ROOF
; end script


Hope this helps!

Regards,
Bill

Hurricane for AutoCAD
http://www.74mph.com
FAQ at
http://www.74mph.com/faq/faq.html
Tutorials at
http://www.74mph.com/tutorials.html
Go to Top of Page

anto1
New Member



11 Posts

Posted - November 09 2005 :  08:12:35 AM  Show Profile  Visit anto1's Homepage  Reply with Quote
Hi Bill
thank you, it wotks fine,
What I need to change in the script to do the same but besides the complete drawing just in one or more blocks?
Go to Top of Page

Admin
Administrator



652 Posts

Posted - November 09 2005 :  08:31:12 AM  Show Profile  Visit Admin's Homepage  Reply with Quote
Hi anto1,

Currently, to be able to specify which blocks to perform it on is not implemented... you have to perform it globally on each drawing, and you would use the "Search and Replace Text Wizard" found in the Wizards menu in Hurricane.

Make sure that you select "Process Blocks".

Hope this helps!

Regards,
Bill

Hurricane for AutoCAD
http://www.74mph.com
FAQ at
http://www.74mph.com/faq/faq.html
Tutorials at
http://www.74mph.com/tutorials.html
Go to Top of Page

Miksteele
Hurricane-Extreme User

USA
216 Posts

Posted - November 09 2005 :  12:09:19 PM  Show Profile  Visit Miksteele's Homepage  Reply with Quote
Hi anto1,

If you are wanting to update certain attributed blocks... it sounds like you need to be using the TITLE BLOCK UPDATE wizard. It works pretty slick. Just make sure you hit the CLEAR button and type in a template name before you start filling in the attribute fields and block name field.

Good Luck!

Mike Fischer
Fischer Design Group, LLC
Building Model Coordination - Steel Detailing - Connection Design
www.FischerDesignGroup.com
Go to Top of Page

anto1
New Member



11 Posts

Posted - November 11 2005 :  11:02:10 AM  Show Profile  Visit anto1's Homepage  Reply with Quote
Hello again,
do you know if I can search the text als "exact phrase" with the GSR routine ?
Thanks
Go to Top of Page

Admin
Administrator



652 Posts

Posted - November 11 2005 :  11:59:41 AM  Show Profile  Visit Admin's Homepage  Reply with Quote
Hi anto1,

I would think that the GSR lisp could be modified to do this, but I am no lisp expert.

I've looked around for another "Text Search and Replace" lisp to perform what you require, but unfortunately, nothing is coming up.

Maybe someone in here can modify GSR.LSP... I'm sure to the seasoned lisp programmer, this is an easy task.

Anyone?

Thanks,
Bill

Hurricane for AutoCAD
http://www.74mph.com
FAQ at
http://www.74mph.com/faq/faq.html
Tutorials at
http://www.74mph.com/tutorials.html
Go to Top of Page

n/a
deleted

112 Posts

Posted - November 11 2005 :  12:25:45 PM  Show Profile  Reply with Quote
Hi anto1:
Maybe I finally have something to contribute to this forum rather than always taking. Try this GSR lisp file. I think this will do what you want to do. If you compare this file to the previous one, you will see that I only had to add a "1" to two lines of the code. Anything ("a", "anto1", "steve"), etc. would have worked in place of the "1". Basically, if anything is added to that location in the "getstring" function, it tells AutoCAD to accept a space in the string. Hopefully that is what you wanted to accomplish. If not, I apologize for wasting your time.

Good luck.

Download Attachment: GSR.ZIP
2.21 KB

Steve Bubendorf
Go to Top of Page

anto1
New Member



11 Posts

Posted - November 14 2005 :  10:26:22 AM  Show Profile  Visit anto1's Homepage  Reply with Quote
hi sbubendorf, thanks for answering, im going to try it and post my results,
Go to Top of Page

anto1
New Member



11 Posts

Posted - November 16 2005 :  05:20:33 AM  Show Profile  Visit anto1's Homepage  Reply with Quote
hi, I made a short test and it works pretty good, thank you, and write again forum , its not a waste of time
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Hurricane Forum © 2009 - 2021 Go To Top Of Page
This page was generated in 0.05 seconds. Snitz Forums 2000