[Search tip detail and code files using keywords, tip number, author name, etc ]
    For tip to function correctly, you must ensure that the downloaded file name matches the file name
    displayed in the Rename File To field. Please rename downloaded files when necessary.
Apply Length Labels at Entity Midpoints
Tip# 3491 By Lee McDonnell On 10-Sep-2010
Rated By 1 users Downloaded : 2226
Categories : Distance, Multiline Text
Software type : AutoCAD 2011
Rename File To : LengthAtMidpoint.lsp
Label AutoCAD entities with their lengths.

Lee McDonnell is back again, this time with a routine that labels AutoCAD entities with their length. This routine works for circles, lines, arcs, and polylines. Start by loading the LISP file and run the command PLL. After you select the objects, an mtext label will be created at the midpoint of each entity, containing a field with the entity length. Circles are labeled at the 180° (or left quadrant) point. Because a field is created, the label will update if the entity's length is changed. Labels are created using the current Units settings for type and precision.

I found this to be a handy tool for visually inspecting the length of several lines at once. I can label them, inspect as needed, then remove the labels using Undo. This is faster and easier than using the List command.   


Average Rating:

User comments
Comment by Hollingsworth,Michael
Posted on 2010-09-27 15:07:01
I downloaded the ZIP file, extracted the LISP file, added it to my library and successfully loaded it in Acad Mechanical 2011. I then drew a circle, line, polyline and arc. When I engaged the LISP, I got this error; ** Error: exceeded maximum number of selection sets ** All I did was pick the circle when asked to select object(s). Any thoughts?
Comment by Hollingsworth,Michael
Posted on 2010-09-27 16:45:41
Well.... whatever it was went away as soon as I restarted Autocad. Before that, even running (gc) did not free up anything. But at least now I am able to use it and it works fine.
Comment by Peterson,Pete
Posted on 2010-09-29 10:51:09
This is very usefull. I can emulate this in AutoLISP and AutoCAD R14. Correct? The reviswed length of an edited entity is available. Right? Just trap the new length and screen it? Often 'Dimensions' are not warrented due the 'settings' requirements. Neat! this is