MLeaderSmartAlign (MSA7)
eplisp, the free multilingual LISP library
| Openly licensed; the original file is hosted here together with its license. | |
… Rate this tool: | |
| Commands | MSA7MLEADERSMARTALIGN |
|---|---|
| Category | Dimensions |
| Author | Pavel Ivashin |
| Source | ivashinpavel07/AutoCAD-AutoLISP-MLeaderSmartAlign |
| License | MIT |
| Version | 0.7 |
| Requirements | AutoCAD for Windows (full version; not LT). Uses Visual LISP ActiveX and a grread live preview; untested in other CAD programs. |
| Prompt language | English |
| Files | MLeaderSmartAlign_v07.lsp (42 KB) |
| Added | 2026-10-26 |
| Download the original fileSource repository | |
Aligns selected multileaders along a line you drag with a live preview, ordering them to reduce crossing leader lines, with an optional perimeter layout.
MLeaderSmartAlign by Pavel Ivashin is an alternative to AutoCAD's MLEADERALIGN. When many callouts point into a crowded area, simply lining them up often makes the leader lines cross; this command chooses the order of the labels from the position of their arrowheads so the result is cleaner.
Overview
After you select at least two multileaders and pick a start point P1, moving the cursor shows the labels evenly spaced along the line from P1 to the cursor in real time. For each slot along the line the routine picks, from the multileaders not yet placed, the one whose arrowhead fits that slot best, and repeats this for every slot. Arrowheads stay where they are; only the text or block content moves. MText is placed by its horizontal center and block callouts by their block position.
Clicking P2 fixes the linear layout. You can then press Esc or right-click to keep it, or move the cursor sideways to enter perimeter mode, which builds a parallelogram from P1, P2 and the cursor and spreads the labels over its four sides according to where their arrowheads lie. Clicking P3 accepts the perimeter layout; Esc during that stage returns to the linear result.
How to use it
- Load MLeaderSmartAlign_v07.lsp with APPLOAD.
- Type MSA7 (or MLEADERSMARTALIGN) and press Enter.
- Select at least two multileaders and press Enter.
- Pick the start point P1 and move the cursor to preview the linear layout.
- Click P2 to fix the line, then press Esc or right-click to keep it, or move sideways and click P3 for the perimeter layout.
Notes and limitations
- The multileaders are modified in place; the whole command is one undo step, and Esc in the first stage restores the original geometry.
- The live preview redraws all selected leaders on every mouse move, so very large selections may feel slow.
- The ordering rule reduces leader crossings but does not test them pair by pair, so some layouts can still cross.
- The README states that the routine was developed with ChatGPT assistance and tested in AutoCAD for Windows; behavior in other CAD programs is unknown.
- The repository was published in 2026; test on a copy of the drawing first.
Source and license
This tool is not made by eplisp. The file is published unchanged under its author's license; copyright stays with the author.
References
- Source repository: ivashinpavel07/AutoCAD-AutoLISP-MLeaderSmartAlign – https://github.com/ivashinpavel07/AutoCAD-AutoLISP-MLeaderSmartAlign/tree/0f317d658140a6274a4e333b412dfebf6b70c40a
- Author: Pavel Ivashin – https://github.com/ivashinpavel07
- License: MIT – https://github.com/ivashinpavel07/AutoCAD-AutoLISP-MLeaderSmartAlign/blob/0f317d658140a6274a4e333b412dfebf6b70c40a/LICENSE
Found a mistake, or are you the author of this tool? Request a correction or removal