You are on page 1of 1

(defun c:lol()

(setq ename(car (entsel)))


(setq edata(entget ename))
(setq strtpt(cdr (assoc 10 edata)))
(setq endpt (cdr (assoc 11 edata)))
(setq len (distance strtpt endpt))
(entmake (list (cons 0 "text") (cons 10 strtpt) (cons 40 5) (cons 50 0.0) (cons 1
(rtos len 2 2))))
)

(defun c:info()
(setq ename(car (entsel)))
(setq edata(entget ename))
(setq strtpt(cdr (assoc 10 edata)))
(setq xloc (nth 1 (assoc 10 edata)))
(setq yloc (nth 2 (assoc 10 edata)))
(command "text" strtpt 5 0 (strcat (rtos xloc) "," (rtos yloc)))
)

(setq p1 (getpoint "\npick first point"))


(setq xloc (car p1))
(setq yloc (cdr p1))
(command "text" p1 5 0 (strcat (rtos xloc) "," (rtos yloc)))

You might also like