[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.
Text Switching
Tip# ALSPSOL0506 By Tony Hotchkiss On 01-May-2006
Rated By 1 users Downloaded : 552
Categories : Styles
Software type : AutoCAD
Rename File To : Tip ALSPSOL0506a Tswitch-shx.lsp, Tip ALSPSOL0506b Tswitch-ttf.lsp
Programs switch text, attributes and table cell text in any combination for SHX text or true-type text.

Kelley Marshall of Richmond, Virginia, requested a routine that performs a number of text-replacement functions, including:
switching selected values of text, attributes and cells in a table object;
replacing selected values of text, attributes and cells in a table object with the value of the first one selected; and
switching groups of cells in a table object by selecting them with a window.
This month's AutoLISP Solution includes multiline text objects as well as text, attribute values and the contents of cells in tables. Figure 1 shows a test drawing that has all of the objects that can be used to replace or switch.

Two versions of the program are available -- TSWITCH-SHX.LSP and TSWITCH-TTF.LSP. The SHX designation is for the standard shape file fonts, and the TTF designation is for TrueType fonts. I made this distinction because the command prompt is slightly different for setting the different types fonts. The programs run only in AutoCAD 2005 and 2006 because earlier versions don't contain table objects and they haven't been tested.



Average Rating:

User comments

Log In