G gordo Contact options for registered users posted on November 18, 2006, 7:29 am Anyone know a way to total the lengths of separate lines without setting up a table and all that schmage? Add pictures here ✖ <% if( /^image/.test(type) ){ %> <% } %> <%-name%> Add image file Upload Bold Italic Underline Upload Image Add reply Notify me about replies to my post Reply Rate this thread
N no-spam-for-hkjffekafphdkdoemehepegkppboihac Contact options for registered users posted on November 18, 2006, 12:18 pm snipped-for-privacy@sonic.net (gordo) wrote: Quoted Text Here Try this lisp from Tee Square Graphics: ;| TLEN.LSP - Total LENgth of selected objects (c) 1998 Tee Square Graphics |; (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) n (1- n))) (alert (strcat "Total length of selected objects is " (rtos tl))) (princ) ) Add pictures here ✖ <% if( /^image/.test(type) ){ %> <% } %> <%-name%> Add image file Upload Bold Italic Underline Upload Image Add reply Notify me about replies to my post Reply
G gordo Contact options for registered users posted on November 18, 2006, 6:36 pm snipped-for-privacy@cix.compulink.co.uk wrote: Quoted Text Here Thanks, it works great. Add pictures here ✖ <% if( /^image/.test(type) ){ %> <% } %> <%-name%> Add image file Upload Bold Italic Underline Upload Image Add reply Notify me about replies to my post Reply
V v-las Contact options for registered users posted on December 16, 2006, 8:45 am what's the command for this lisp? tnx snipped-for-privacy@cix.compulink.co.uk wrote: Quoted Text Here Add pictures here ✖ <% if( /^image/.test(type) ){ %> <% } %> <%-name%> Add image file Upload Bold Italic Underline Upload Image Add reply Notify me about replies to my post Reply
J Contact options for registered users posted on December 16, 2006, 9:12 am After loading the lisp Command: (load "tlen.lsp") type at the command line Command: tlen Regards Juergen Quoted Text Here Add pictures here ✖ <% if( /^image/.test(type) ){ %> <% } %> <%-name%> Add image file Upload Bold Italic Underline Upload Image Add reply Notify me about replies to my post Reply