AutoSnap (ASNAP)
eplisp, the free multilingual LISP library
| Openly licensed; the original file is hosted here together with its license. | |
… Rate this tool: | |
| Commands | ASNAP |
|---|---|
| Category | Cleanup and Files |
| Author | Li Jingkang (李靖康) |
| Source | BossK73/AutoSnapLisp |
| License | Apache-2.0 |
| Version | 0.3.37 |
| Updated | 2025-08-09 |
| Requirements | AutoCAD (full version, not LT). The author tested it on AutoCAD 2018 and 2024 on Chinese (GB18030) Windows. |
| Prompt language | Chinese |
| Files | AutoSnapPluginGB18030.lsp (10 KB) |
| Added | 2026-10-26 |
| Download the original fileSource repository | |
Rounds line and polyline vertices to the nearest multiple of a given step and draws cleaned copies on a separate Asnap layer, keeping the originals.
ASNAP is a geometry cleanup tool written by Li Jingkang (李靖康). In hand-drawn drawings or ones imported from other formats, endpoints are often off by a few millimeters; it snaps them to a grid to reduce corners that do not meet and small gaps.
Overview
LINE, LWPOLYLINE and block (INSERT) objects are selected; if nothing is selected, all such objects in the drawing are used. The X and Y of every vertex are rounded to the nearest multiple of the "fuzz" distance you enter, and Z is set to 0. Consecutive duplicate vertices are removed, lines that collapse to a point are dropped, polylines left with two vertices become lines, and identical results are deduplicated.
Results are drawn on a new Asnap layer (red, 0.30 mm lineweight). For blocks, a new block definition named <block name>_ASNAP is created with its contents processed the same way and inserted at the original block's position; the original objects are not deleted.
How to use it
- Load AutoSnapPluginGB18030.lsp with APPLOAD.
- Type ASNAP at the command line.
- Select lines, polylines and blocks, or press Enter straight away for the whole drawing.
- Enter the rounding (fuzz) distance.
- Check the results on the Asnap layer; the original objects stay in place.
Notes and limitations
- Prompts and messages are in Chinese and the file is saved in GB18030 encoding; on non-Chinese systems these strings appear as garbled characters.
- Polyline arcs (bulges), widths and Z values are discarded; polylines with arcs become straight segments.
- Creates the Asnap layer and adds new *_ASNAP block definitions. The author notes that nested blocks are not processed and that some blocks produce extra geometry.
- If nothing is selected, every line, polyline and block in the drawing is processed, including paper space.
- Older version files in the repository carry a different license statement; only the current file with the Apache 2.0 header is offered here.
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: BossK73/AutoSnapLisp – https://github.com/BossK73/AutoSnapLisp/tree/2159ebfb996d33cae3f85e2ae98f3b3c1aae0397
- Author: Li Jingkang (李靖康) – https://github.com/BossK73
- License: Apache-2.0 – https://github.com/BossK73/AutoSnapLisp/blob/2159ebfb996d33cae3f85e2ae98f3b3c1aae0397/LICENSE
Found a mistake, or are you the author of this tool? Request a correction or removal