;;; ;;; ;;;> Author: Henry C. Francis ;;;> 425 N. Ashe St. ;;;> Southern Pines, NC 28387 ;;;> http://paracadd.com ;;;> All rights reserved. ;;; ;;;> COPYRIGHT: 4-8-2005 ;;;> EDITED: 04-08-2005 ;;; (DEFUN c:linesum ( / linesum linent liness liness_len cnt) (SETQ linent (ENTSEL "\nSelect line for layer")) (SETQ linent (ENTGET (CAR linent))) (SETQ liness (SSGET "x" (LIST (CONS 0 "LINE") (ASSOC 8 linent)))) (SETQ liness_len (SSLENGTH liness)) (SETQ cnt 0) (SETQ linesum 0) (WHILE (< cnt liness_len) (SETQ it (ENTGET (SSNAME liness cnt))) (SETQ linesum (+ linesum (DISTANCE (LIST (CADR (ASSOC 10 it)) (CADDR (ASSOC 10 it)) 0.0 ) ;_ end of LIST (LIST (CADR (ASSOC 11 it)) (CADDR (ASSOC 11 it)) 0.0 ) ;_ end of LIST ) ;_ end of DISTANCE ) ;_ end of + ) ;_ end of setq (SETQ cnt (1+ cnt)) ) ;_ end of while (PRINC "\nTotal length = ") (PRINC linesum) (PRINC) ) ;_ end of defun ;|«Visual LISP© Format Options» (72 2 40 2 T "end of " 60 9 2 0 0 T T nil T) ;*** DO NOT add text below the comment! ***|;