View Full Version : Line length in AutoCAD


Willallison
04-29-2008, 10:07 PM
I have a number of objects in AutoCAD for which I need to determine their length. For simple lines, the "properties" tool gives length as one of its outputs. But most are also made up of splines...
How to determine their length?
And is there a simple way in AutoCAD to determine the total length of a combination of lines and splines etc?

Willallison
04-29-2008, 10:20 PM
Sorry, I should have been a little more specific...
Is there a way of determining perimeter length in objects made up of a combination of line types, that are not closed

CGN
04-29-2008, 11:53 PM
there is a command in autocad called lengthen works with lines. plines, splines etc...this si porbably what you are looking for i guess if you want to find the perimeter or girth of a frame lengthen is the command.

Go here:
http://www.spaug.org/LISP_Index00.Html

and find Totlen.lsp

is a lisp command for autocad that sums all lengths of defined elemnts

Willallison
04-30-2008, 02:20 AM
Ah - yes of course... "lengthen" gives you the current length on the command line before you activate the command.
Thanks CGN
I'm not familiar with LISPS... will have to look into it....
It still surprises me that AutoCAD doesn't have a command to determine the total length of multiple lines though....

Arvy
04-30-2008, 07:58 AM
didn't know that command.. I always used list with splines. Will try this one out, will come in handy often!

bobg3723
05-31-2008, 12:01 AM
The AREA command gives the perimeter and area of splines and LWpolylines (2D polyline), closed or open. 3Dpoly (3d polylines) only return the perimeter.
To select the polyline Entity, type:

AREA e

regards,
Bob

Willallison
06-01-2008, 08:31 PM
Thanks Bob! Exactly the command I was looking for..... not sure why I didn't twig to it earlier:rolleyes:

bobg3723
06-01-2008, 11:44 PM
Happy to oblige. :)

To find the area of a 3dpolyline, you have to, (a) click points with the mouse, or (b) supply points as a list on the command line in a lisp statement:
(setq foo '((10 5 0) (0 -50 0) (-8 5 25)))
(command "area" foo "" )

This is just an quick example. Any legal parameter that AREA expects can be supplied in a list. You may want to write your own lisp utitlities to do just that. There's plenty of examples scattered throughout the various autolisp forums.

Cheers,
BobG

View Full Version : Line length in AutoCAD