Home - AEC Plugins - AutoCAD Add-Ons - Align Objects to Curve for AutoCAD 1.7

Align Objects to Curve for AutoCAD 1.7

Publisher:
File size:
20 KB
Date added:
Mar 13, 2022 | Last update check: 1 minute ago
Licence:
Freeware
Runs on:
AutoCAD
Download Latest Version
(20 KB)

Align Objects to Curve for AutoCAD is a LISP program that enables you to dynamically align selected objects to a selected curve, with placement controls. The program should perform successfully in all UCS and Views, and in all versions of AutoCAD that have Visual LISP functions available (AutoCAD 2000 onwards running on a Windows OS). The function syntax is OA.

Typical workflow:

  1. Start the program. Load the program (see “How to load an AutoLISP program“). Write OA in command-line and press Enter.
  2. Select objects to align. Make a selection of objects to be aligned.
  3. Specify basepoint. Specify a base point to use during alignment. By default, the program will use the center of the bounding box of the selection of objects.
  4. Select curve to align objects. Select a curve object (this may be a Line, Polyline, Arc, Circle, Ellipse, XLine, Spline etc.) to which the objects are to be aligned. The selected curve may be a primary object, or nested with a Block or XRef to any level.
  5. Use intuitive placement controls. 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” or “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” or “r” key.
    • The user may toggle “Multiple mode” by pressing the “M” or “m” key; when enabled, the user may continuously align multiple copies of the selected objects to the selected curve.
  6. Place the objects and exit the program. Click the left or right mouse buttons, press Enter or Space, or press the “E” or “e” keys.

About AutoLISP

AutoLISP is a simple programming language that has been specifically written for designers and architects. AutoLISP originated from LISP language that was created before AutoCAD and was not specifically written for designers. AutoLISP is an AutoCAD’s own version of LISP. LISP is an acronym for List Processing. The format of the LISP language revolves around the proper structure of the lists. A list is defined with parentheses, with the function specified first. It is integrated with the AutoCAD environment, and it contains built-in functions that create and edit geometric entities. Since AutoCAD 2000, the original AutoLISP engine was replaced with the Visual LISP engine. Most people use the phrase LISP instead of AutoLISP and Visual LISP. LISP file extension is .LSP.

How to load an AutoLISP program

  1. Download the AutoLISP file.
  2. Decide between two options:
    • Load the program file into the current drawing session. In AutoCAD, go to Manage – Load Application, or enter APPLOAD in the command-line. Select the program file and click “Load”. Now all the functions within that file are available to you.
    • Load the program file(s) when you open a drawing. AutoCAD automatically loads two LSP files if they’re found in the support directory locations. The files are called Acad.lsp (loads when you start AutoCAD) and AcadDoc.lsp (loads when you create or open a new drawing). If the files don’t exist you need to create them (using Visual LISP Editor or Notepad) and save it in AutoCAD support path. To add a new support file search path in AutoCAD, go to Options – Files – select Support File Search Path – Add – browse for the location of the LSP files – Ok. Using the load function within the AcadDoc you can automatically load other LSP routines. When you create or open a new drawing, it loads the LISP file and all the functions that are found within it. If loading many LISP files on startup cause drawings to open slower, you can use AutoLoad function to load LISP files when you enter a specific command at the command-line.

What’s new in version 1.7:

  • Modified program to remove the final set of objects if the user exits the alignment using ENTER, SPACE, right-click, or Exit.

About Lee Mac Programming

Lee Mac Programming is founded by Lee Mac, a developer from England dealing with AutoCAD customisation. He started programming AutoCAD in 2009. In AutoLISP he sees the potential for productivity in customisation and automation. With the support of the CADTutor and TheSwamp communities he developed collection of AutoLISP functions.

Gallery

Align Objects to Curve for AutoCAD Screenshot 1
Align Objects to Curve: Select objects to align. ©Civil Engineering Survey

Align Objects to Curve for AutoCAD Screenshot 2
Align Objects to Curve: Placement controls. ©Civil Engineering Survey

Align Objects to Curve for AutoCAD Screenshot 3
Align Objects to Curve: Multiple mode. ©Civil Engineering Survey


Latest Version

Align Objects to Curve for AutoCAD 1.7

Old Versions