[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.
Draw a Border around Text
Tip# 3440 By Walt Bedinger On 10-Jun-2010
Rated By 1 users Downloaded : 1076
Categories : Multiline Text, Single-Line Text
Software type : AutoCAD 2011
Rename File To : Txtbox.lsp
Draw a rectangle around one or more text and Mtext entities.

Architect Walt Bedinger, a longtime contributor, submitted a routine that will draw a rectangle around one or more text and Mtext entities. This is an update to a tip that Walt submitted more than 15 years ago. To use this routine, load the LISP file, then enter Txtbox at the Command line. Select one or more text or Mtext entities, and enter the offset distance. A rectangular border will be created around the selected entities. If you need individual borders for multiple entities, just repeat this routine for each one. Lowercase letters with descenders, such as j, p, and q, may not be fully enclosed within the border.


Average Rating:

User comments
Comment by Brusco,Slam
Posted on 2010-06-21 13:26:24
clever code but why would i use this over the express text tool "tcircle?" Maybe if spent an hour with new releases, we would stop re-inventing the wheel?
Comment by Gallagher,Ross
Posted on 2010-06-21 18:28:53
Hi, This is better than Tcircle as it will enclose multiple lines of Dtext in a single box. Tcircle will place one box around each line of Dtext.
Comment by Hanby,Jill
Posted on 2010-06-22 15:00:35
Why not just use the rectangle command to draw a rectangle around the text? Seems to me it would save a step.
Comment by Gallagher,Ross
Posted on 2010-06-24 20:47:29
This routine will align the box to the text unlike the rectangle command which aligns to the ucs. Saving multiple steps. Also draws a perfectly offset rectangle every time.

Log In