ANDY0871 Posted March 24, 2009 Posted March 24, 2009 I have 40 or 50 polylines on a drawing. going in all different directions. so i really cant just attach them all together and draw a long line.....What i wanted to do was to add the total length of all the lines without listing every one and adding them all up...Any easy way? Quote
uddfl Posted March 24, 2009 Posted March 24, 2009 Sounds like the Express Tool PLJOIN might help with this. Or PEDIT _Join. Quote
ANDY0871 Posted March 24, 2009 Author Posted March 24, 2009 where would i get those express tools? i have mep 2009 Quote
uddfl Posted March 24, 2009 Posted March 24, 2009 ^ Ah sorry, didn't realize that. Does PEDIT work on MEP 2009? if not, try typing EXPRESSTOOLS at the command line; If not, I found PLJOIN via Google. Copy and paste it into notepad and save it with .LSP extension, then APPLOAD it into your drawing. I hope it doesn't require other functions. http://ww3.cad.de/foren/ubb/uploads/Kramer24/pljoin.lsp.txt Quote
Biscuits Posted March 24, 2009 Posted March 24, 2009 Found this one from Tee Graphics a few years back ;TLEN.LSP - Total LENgth of selected objects;© 1998 Tee Square Graphics ; ;(alert "Lisp ERROR Select OK to proceed. ;Previous work will not be Saved.") (defun C:TLEN (/ ss tl n ent itm obj l) (setq ss (ssget) tl 0 n (1- (sslength ss))) (while (>= n 0) (setq ent (entget (setq itm (ssname ss n))) obj (cdr (assoc 0 ent)) l (cond ((= obj "LINE") (distance (cdr (assoc 10 ent))(cdr (assoc 11 ent)))) ((= obj "ARC") (* (cdr (assoc 40 ent)) (if (minusp (setq l (- (cdr (assoc 51 ent)) (cdr (assoc 50 ent))))) (+ pi pi l) l))) ((or (= obj "CIRCLE")(= obj "SPLINE")(= obj "POLYLINE") (= obj "LWPOLYLINE")(= obj "ELLIPSE")) (command "_.area" "_o" itm) (getvar "perimeter")) (T 0)) ; tl (+ tl l 75) tl (+ tl l) n (1- n))) ; (alert (strcat "Total length of selected objects is " (rtos tl))) (princ TL) (PRINC) ) Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.