Chain Length

See also Chain Selection.

Function Syntax chainlen
Current Version 1.0
Download ChainLengthV1-0.lsp
View HTML Version ChainLengthV1-0.html

Program Description

This program enables the user to calculate the total object length between two points along a chain of connected objects.

Upon issuing the command syntax chainlen at the AutoCAD command-line, the user is first prompted to make a selection of objects; this selection may consist of any set of open geometric objects, and may contain multiple chains of connected objects, or indeed, no connected objects. Following a valid selection, the user may then specify two distinct points located on any two objects in the selection, or with both points located on the same object.

The program will then proceed to calculate the total length along the series of connected objects between the two given points, and will print the result to the AutoCAD command-line. The printed length will be formatted in line with the current units & precision settings (i.e. dependent upon the values of the LUNITS & LUPREC system variables respectively).

A set of distinct objects will be considered a 'chain' if each endpoint coincides with the endpoint of another object in the selection, as shown by the demonstration below.

The user will be notified if the two given points do not lie on the same chain of objects in the selection.


Chain Length Demo

See also Chain Selection.

Instructions for Running

Please refer to How to Run an AutoLISP Program.


increase · reset · decrease

Designed & Created by Lee Mac © 2010