Function Syntax Label
Current Version 1.1
Download LabelV1-1.lsp
View HTML Version LabelV1-1.html

Program Description

This program is a stripped down, faster & improved version of my previously published Align Text to Curve program.

Where my previous text alignment program permitted the user to align existing Text, MText or Attributes, this rather more refined program has been streamlined to allow the user to solely create MText 'labels' dynamically aligned to a selected object, with additional placement controls available at the command-line.

The user is first prompted to specify the content for the label, during which the previously entered string is available as a default option. The user is then prompted to select an object to be labeled.

The selected object can be any object defined as a Curve Object, this includes: Lines, XLines, LWPolylines, 2D (Heavy) Polylines, 3D Polylines, Arcs, Circles, Ellipses, Elliptical Arcs & Splines. The user can also select objects nested within uniformly scaled Blocks, Dynamic Blocks or XRefs, nested to any level.

Following valid responses to both prompts, the program will create a middle-center justified MText label with the specified content and allow the user to dynamically position the label along the selected curve.

During label positioning, additional alignment controls are available at the command-line to refine the position of the label relative to the curve. Such controls are described in the following table:

Label Alignment Controls
Key Action
Click (or Enter/Space/Right-Click) Place Label
+ / - Increase / Decrease Label Offset (by factor of text height)
O / o Specify exact Label Offset
P / p Toggle Label Perpendicularity
B / b Toggle Label Background Mask

The program will furthermore work under all UCS & View settings, and with Annotative Text Styles.

This program may be useful for projects involving pipeline labeling on a P&ID, labeling of electrical wiring diagrams, or in other such situations in which a label is aligned to an object and may occur multiple times along the length of an object.



Instructions for Running

Please refer to How to Run an AutoLISP Program.


increase · reset · decrease

Designed & Created by Lee Mac © 2010