Box Text

Function Syntax BT
Current Version 1.2
Download BoxTextV1-2.lsp
View HTML Version BoxTextV1-2.html
Donate

Program Description

This program performs in much the same way as the Express Tools' TCircle command: enabling the user to create a 2D polyline rectangular frame around selected Text & MText objects, with a user-defined offset. The program will also perform successfully with Text or MText defined in any construction plane, and under all UCS & view settings.

Upon issuing the command syntax BT at the AutoCAD command-line, the program first prompts the user to specify an offset factor for the text frame. This factor is multiplied by the text height for every selected text object to determine the offset of the rectangular frame from the text. At this prompt, the last used value is available as a default option.

The program then prompts the user to make a selection of text and/or mtext objects. Following a valid selection, the program iterates over the selection and constructs a rectangular frame surrounding each object, offset by a distance determined by the given offset factor. The generated text box will inherit the basic properties of the enclosed text object (e.g. Layer, Linetype, Lineweight etc.).

Writing this program provided a fantastic learning opportunity into the methods of making a program compatible for use in all Views & User Coordinate Systems (UCS); and I would furthermore like to thank Gilles Chanteau (gile) for his help and advice on the subject.

Example of Usage

BoxText.gif

Instructions for Running

Please refer to How to Run an AutoLISP Program.

textsize

increase · reset · decrease

Designed & Created by Lee Mac © 2010