[Search tip detail and code files using keywords, tip number, author name, etc ]
 
    For tip to function correctly, you must ensure that the downloaded file name matches the file name
    displayed in the Rename File To field. Please rename downloaded files when necessary.
Match Text Content
Tip# 3090 By Eli Kay On 11-Jan-2009
4
Rated By 1 users Downloaded : 2784
Categories : Edit Text
Software type : AutoCAD 2009
Rename File To : MAT.LSP/,MAT.LSP/.DS_Store,__MACOSX/,__MACOSX/MAT.LSP/,__MACOSX/MAT.LSP/._.DS_Store,MAT.LSP/ACA-Trap.LSP,MAT.LSP/mat.LSP
Here is a LISP routine similar to the AutoCAD command, Match Properties to “match” text in a drawing.

Eli Kay got an idea for a LISP routine similar to the AutoCAD command, Match Properties to “match” text in a drawing.  MATCH TEXT (MAT.LSP) will ask the user for a primary text object (dtext or mtext) and match the contents to newly selected object(s) (dtext or mtext). I use a modified error trap (also attached) to help with error control.

 Notes from Cadalyst Tip Patrol:  This is a very useful routine.  Type MAT on the command line to start the routine.  Select the text (either dtext or mtext) to copy, and then select the target text.  You can select more than one object for your target(s).  If you copy mtext that has returns in it to a dtext object, it will still work but with a /p character designating where the return (or paragraph) was entered.  You can execute a FIND/REPLACE to get rid of the /p if you want to.  But be careful, this command replaces all of the text in an object; it doesn’t add to it.  This routine was tested in AutoCAD 2009.
 

 

Average Rating:
4


User comments
Comment by Baker,David
Posted on 2009-01-13 12:25:15
The "Rename File to:" statement is unclear to me. there are 4 files in the downloaded zip file. Which file gets renamed to what exactly?
Comment by Baker,David
Posted on 2009-01-13 12:25:55
The "Rename File to:" statement is unclear to me. there are 4 files in the downloaded zip file. Which file gets renamed to what exactly?
Comment by Baker,David
Posted on 2009-01-13 12:26:44
The "Rename File to:" statement is unclear to me. there are 4 files in the downloaded zip file. Which file gets renamed to what exactly?