(defun c:tt () (vl-load-com) (setq obj (car (entsel "\nSelect a Polyline: "))) (MASSOC 10 (entget obj)) ) (defun massoc (key alist / nlist tmp)
(foreach x alist (if (eq key (car x)) (setq nlist (cons (cdr x) nlist)) ) )
(setq num (length nlist)) (setq tmp 0) (repeat num (zz (nth tmp nlist)) (setq tmp (+ 1 tmp)) ) )
(defun zz (p1 / x y) (setq x (strcat "X-" (rtos (nth 0 p1) 2 3)) y (strcat "Y-" (rtos (nth 1 p1) 2 3)) ) (command "line" p1 (polar p1 0 30) "") (command "text" "j" "bl" p1 2.5 0 x) (command "text" "j" "tl" (polar p1 85 -2) 2.5 0 y) ) |