T O P I C R E V I E W |
cswancott |
Posted - February 17 2006 : 04:58:24 AM Does anyone know how to search & replace Mtext within a block, I have tried both the normal & mtext searchs together, but does not seem to work on mtext within a block. Perhaps I am just doing it wrong.
It would also be useful to specify a specific block by name to search, as this would speed up the processing no end.
I have searched the web & other threads but can not seem to find anything relating to Mtext within blocks, perhaps its just not working because the blocks are in paperspace?
Any help would be much appreciated.
Craig.
|
5 L A T E S T R E P L I E S (Newest First) |
cswancott |
Posted - February 23 2006 : 03:27:05 AM I tried to repost this last night but it obviously never worked, I have attached the Lisp routine which includes prompts for the Block name & search/replace text. This is much easier to script as you can just run a number of times within the script changing the prompt responses for any variations without having to change the lisp.
Much better I think.
Download Attachment: RBS2.zip 930 Bytes |
Admin |
Posted - February 22 2006 : 5:19:15 PM Thanks Craig,
That is great! We all need more stuff like that! (Hey... I just had and idea... Maybe a "Post your Favourite lisps" thread could drum up some more sharing of lisp routines)
We all appretiate the follow up!
Regards, Bill |
cswancott |
Posted - February 22 2006 : 12:05:05 PM Have managed to get what I needed, this lisp enables me to search for specific string & replace within a specific block by name (the titleblock), as different drawings have similar blocks with different names I have just doubled the code and marked it up accordingly.
This lisp should work on all drawings which are currently open & also when scripted using SDI=1, single drawing at a time.
Hope this helps someone else too.
Download Attachment: RBS.zip 1.13 KB |
cswancott |
Posted - February 17 2006 : 08:48:23 AM Many thanks for your help.
I did think about exploding the blocks, but unfortunately I am unble to, We work like an agency, and our clients are very particular about their drawings, the blocks are generated autmatically by a program (Codebook), and I have asked if it can be changed to create the text as attributes, this would make a lot more sense, but I will just have to work with what I have got for the moment.
I suppose it may be possible to explode, edit & then recreate block, as I know it is a specific named block in each drawing. Will post on Autodesk website and let you know if I get any answers.
Many thanks for the Lisp routine, I will have a play with it.
Regards,
Craig
|
Admin |
Posted - February 17 2006 : 07:51:32 AM Hi cswancott,
I've taken a look around, and have run into the same wall... I can't find what you need. There are many routines to Search and Replace MTEXT, but not when it is embedded in a block.
You could also possibly request it in the AutoDesk discussion forum. I would bet there is something somewhere that can help. (Have you lurked around in here... http://groups.google.com/groups?q=autocad )?
In the meantime, I actually found something I've been looking for on a similar note.
Download Attachment: fixtext.zip 1.29 KB
This lisp will perform MTEXT search and replace (using lisp), (Currently Hurricane's built-in Wizard generates code that only uses VBA)
Unfortunately, after testing the above it doesn't Search and Replace MTEXT that is in a BLOCK . I suppose "explode"ing, or "burst"ing is out of the question in your case??
Regards, Bill |
|
|