Help Needed: AutoCAD LISP – Point Numbering with Block Attributes
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello everyone,
I’ve prepared a LISP with some help, and I need an upgrade. Here’s what the current LISP does:
Takes the vertices of a selected polyline
Places a point at each vertex
Places a number (text) near each point
Prompts the user for text height and text offset
The problem is:
- If two vertices are very close, it’s hard to tell which number belongs to which point.
- I tried converting the point + number into a block with an attribute, so the number increments automatically for each vertex.
- I want a solution where selecting the block selects both the point and the number, making it easy to see which number belongs to which point.
I’ve tried multiple approaches, but I keep running into issues:
Errors when creating the block programmatically
Attribute numbers not updating correctly
Blocks appearing larger than expected or containing the polyline itself
I’m looking for a robust solution where:
The block contains both the point and a number attribute
The number increments sequentially across all vertices and polylines
The text offset is customizable
A CSV with number, X, Y coordinates is exported
Has anyone successfully implemented something like this in AutoCAD using LISP? Any tips, example code, or guidance would be greatly appreciated.
Thanks in advance!