Dynamic Text Alignment
Function Syntax | TxAlign |
Current Version | 1.6 |
Download | DynamicTextAlignV1-6.lsp |
View HTML Version | DynamicTextAlignV1-6.html |
Program Description
This was one of my earlier programs, and more of an experiment into pushing the envelope of the use of input tracking functions such as GrRead. Whilst visually pleasing, in my opinion, this program is not as practical an application as it could be, but then, I shall let you be the judge of that.
This program will allow the user to dynamically align multiple MText and DText objects simultaneously to any angle, or along an object. The user is prompted for a selection of text objects and an alignment point or text object to use as a base point relative to which the text is aligned.
The user may then switch between different modes using the Tab key, depending upon how the text needs to be aligned, these modes are described below.
Mode | Functionality |
---|---|
Horizontal Mode | For aligning multiple lines of text |
Vertical Mode | For aligning a single line |
Stretch Mode | Will evenly space text from the first text object in the selection. |
When operating within these mode, other alignment options become available to the user, including:
Key | Functionality |
---|---|
R / r | Alter Text Rotation |
Shift | Hold Shift to Rotate Text Perpendicular to the Angle of Alignment |
J / j | Alter Text Justification |
S / s | Space Text to a Specified Distance (Available in Horizontal/Vertical Mode) |
O / o | (Object Alignment Mode) Align Text to an Object |
Example of Usage
Object Alignment Mode
Upon pressing O during text alignment, the user is prompted to select an object along which to align text.
Text may be aligned to any Curve Object (Spline/Arc/Ellipse/Line/Polyline/Circle.. etc), and the user is provided with additional refinement options, including the following:
Key | Functionality |
---|---|
V / v | Reverse the order of the text objects along the curve |
O / o | Dynamically Alter Text Offset from Curve |
S / s | Dynamically Alter Text Spacing along Curve |
R / r | Alter Text Rotation |
Shift | Hold Shift to Align Text Rotation to Curve |
E / e | Exit Object Alignment Mode |
Example of Object Alignment Mode
Instructions for Running
Please refer to How to Run an AutoLISP Program.