if you are familier with lisps there are lots of threads deiscussing this in lisps forum. I have no knwoledge of lisps, so can not guide you in right direction
Alos look at the similr threads listed here at bottom of this this thread.
Registered forum members do not see this ad.
I m working in large housing project and i wanted to measure total portabal water pipeline length which is nearly 40 km long....I did it getting dimensions part by part.....nearly 750 lines were there(same layer) is there any easy method to get total line length at once.......if so pl. explain ste by step......



if you are familier with lisps there are lots of threads deiscussing this in lisps forum. I have no knwoledge of lisps, so can not guide you in right direction
Alos look at the similr threads listed here at bottom of this this thread.
"An architect's most useful tools are an eraser at the drawing board & a wrecking bar at the site."
Frank Lloyd Wright
http://www.cadtutor.net/forum/showthread.php?t=7418
something like this?
It's nice to be nice, but sometimes is nicer to be evil!.
![]()
Tip: Please do not PM or email me with CAD questions - use the forums, you'll get an answer sooner.




Download TLEN.LSP from http://www.turvill.com/t2/free_stuff/index.htm.
If you don't know what to do with lisp files, see this.
Or maybe this old one will rear it's head again.
http://www.cadtutor.net/forum/showth...light=c%3Azone
-David
R12 (Dos) - A2K
This wasn't created by me(I'm not very good with "vl") I obtained it at work. It extracts the distance of all polylines on all layers to an excel file.
Code:(defun c:ple (/ elist en i layer layer_list leng pline row ss sumlen total x xlApp xlBook xlBooks xlCells xlSheet xlSheets ) (vl-load-com) (setq xlApp (vlax-get-or-create-object "Excel.Application") xlBooks (vlax-get-property xlApp "Workbooks") xlBook (vlax-invoke-method xlBooks "Add") xlSheets (vlax-get-property xlBook "Sheets") xlSheet (vlax-get-property xlSheets "Item" 1) xlCells (vlax-get-property xlSheet "Cells") ) (vla-put-visible xlApp :vlax-true) ;headers (vlax-put-property xlCells "Item" 1 1 "Layer") (vlax-put-property xlCells "Item" 1 2 "Length") (setq row 2 total 0) (setq ss (ssget "_X" (list (cons 0 "*POLYLINE"))) i -1) (repeat (sslength ss) (setq en (ssname ss (setq i (1+ i))) elist (entget en) layer (cdr (assoc 8 elist))) (if (not (member layer layer_list)) (setq layer_list (cons layer layer_list)))) (repeat (length layer_list) (setq layer (car layer_list)) (setq ss (ssget "_X" (list (cons 0 "*POLYLINE")(cons 8 layer))) i -1 sumlen 0) (repeat (sslength ss) (setq pline (vlax-ename->vla-object (ssname ss (setq i (1+ i))))) (setq leng (vlax-curve-getdistatparam pline (vlax-curve-getendparam pline))) (setq sumlen (+ sumlen leng))) (vlax-put-property xlCells "Item" row 1 layer) (vlax-put-property xlCells "Item" row 2 (rtos sumlen 2 3)) (setq total (+ total sumlen)) ;;; (vlax-put-property xlCells "Item" row 2 (rtos sumlen 2 3)); for metric units (setq layer_list (cdr layer_list)) (setq row (+ row 1)) ) (setq row (+ row 1)) ; footers: (vlax-put-property xlCells "Item" row 1 "Total:") (vlax-put-property xlCells "Item" row 2 (rtos total 2 3)) ;;;(vlax-put-property xlCells "Item" row 2 (rtos total 2 3)); for metric units (mapcar (function (lambda(x) (vl-catch-all-apply (function (lambda() (progn (vlax-release-object x) (setq x nil))))))) (list xlCells xlSheet xlSheets xlBook xlBooks xlApp) ) (alert "Close Excel file manually") (gc)(gc) (princ) ) (princ "\t\t***\t Type PLE to write polines length to Excel\t***") (princ)
***Commandobill***
Abusing AutoCad Since 1999
"Caddatude... Do you has it?"
Sorry for my poor English, I'm American...
The attached asks you for a layer name and returns total length of all lines and arcs on that layer. I use it for roadway striping take-offs regularly.
No Polylines for this routine though.
One dog barks at something, the rest bark at him - Chinese proverb.
Sounds like American Politics to me....




Make sure if your using a lisp that it is searching for all objects on a layer as Arizona hinted if it only searches for plines. You need a program that searches for arcs lines polylines lwplines 3dplines and adds all of them up. I am sure someone here has one will check one I have in VBA.
One problem though with auto take offs you must be 100% confident that the drawing is correct we find the problem a lot where we have offset lines hence answer x 2.
Registered forum members do not see this ad.
Dear BIGAL.....
Any how I could load ALEN'S routine well...now i know how to work with his routine....Now i want to know how to write these routines....can you help me please
Many thanks to all friends here helping me at all
Bookmarks