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. |