Align Objects to Curve

Function Syntax OA
Current Version 1.7
Download ObjectAlignV1-7.lsp
View HTML Version ObjectAlignV1-7.html

Program Description

This program will enable the user to dynamically align a selection of objects to a selected curve, with intuitive placement controls.

Upon starting the program with the command syntax OA, the user is prompted to make a selection of objects to be aligned. Following a valid selection, the user is prompted to specify a base point to use during alignment; at this prompt, the program will use the center of the bounding box of the selection of objects by default.

The user is then prompted to select a curve object (this may be a Line, Polyline, Arc, Circle, Ellipse, XLine, Spline etc.) to which the selection of objects are to be aligned. The selected curve may be a primary object, or an object nested with a Block or XRef, nested to any level.

After selection, the program offers several controls to aid with object placement displayed at the command line:

[+/-] for [O]ffset | [</>] for [R]otation | [M]ultiple | <[E]xit>:

The offset of the objects from the curve may be controlled incrementally by a tenth of the object height using the + / - keys, or a specific offset may be entered upon pressing the O key.

The set of objects may be rotated anti-clockwise or clockwise by 45 degrees relative to the curve by pressing the < or > keys respectively; alternatively, the user may enter a specific rotation by pressing the R key.

The user may toggle 'Multiple Mode' by pressing the M key; with this mode enabled, the user may continuously align multiple copies of the selected objects to the selected curve.

Finally, the user may place the objects by left-clicking the mouse, or may exit the program by right-clicking the mouse, pressing Enter or Space, or by pressing the E key to invoke the Exit option.

The program should perform successfully in all UCS & Views, and in all versions of AutoCAD that have Visual LISP functions available (AutoCAD 2000 onwards).

Program Preview


Instructions for Running

Please refer to How to Run an AutoLISP Program.


increase · reset · decrease

Designed & Created by Lee Mac © 2010