Sie sind auf Seite 1von 1

(defun C:GESL (/ 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 "Gesamtlänge ist " (rtos tl)))

(princ)

https://forums.autodesk.com/t5/autocad-produktfamilie-deutsch/wie-kann-ich-die-gesamtlange-
unabhangiger-objekte-in-autocad/td-p/6321309

Das könnte Ihnen auch gefallen