[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.
Adjust Text for All Drawings in a Directory
Tip# 2028 By Andrzej Gumula On 01-Apr-2005
Rated By 1 users Downloaded : 1054
Categories : Notes/Text, Find Text, Styles
Software type : AutoCAD
Rename File To : Tip2028: Replace Text In Dwgs.lsp**
Adjust Text for All Drawings in a Windows Directory, including title blocks, drawing notes, etc.

Adjust Text for All Drawings in a Directory
Our last tip of the month is another monster cool routine from Andrzej Gumula in Poland. Adjust Text for All Drawings in a Directory (Tip #2028) demonstrates how the AutoCAD object system as exposed in Active X can be exploited by Visual LISP. One problem that has always plagued LISP programmers in AutoCAD is how to exploit the system's tools in Windows, and Andrzej demonstrates how easy it is using objects in AutoCAD. Plus, this handy utility can be used for title blocks, drawing notes and so forth to update complete projects with a single command. This utility consists of a LISP source file and a dialog box DCL file. Place the dialog box file in a directory where AutoCAD can find it. Then load the LISP file and type Reid at the AutoCAD Command line. A dialog box will appear with the options available as shown (figure 2).

Enter the text to be changed, select the directory to search and select the various search-and-replace parameters you want, then press OK to let it fly. This utility goes through the folder selected and replaces any text found, all the while reporting the progress at the Command line in AutoCAD. This routine is brilliant, and Harry tips his hat to the programming genius Andrzej!



Average Rating:

User comments