|
(defun c:mj()
(setvar "cmdecho" 0)
(setq pt (getpoint "\n选取点:"))
(while pt
(command "bpoly" pt "")
(setq en (entlast))
(if (/= en nil)
(progn
(command "area" "o" en)
(setq aa (getvar "area" ))
(setq b (rtos aa 2 2))
(redraw en 3)
(setq c (* 0.0015 aa))
(setq c1 (rtos c 2 4))
(setq d (strcat c1 ))
(setq p (getpoint "\n选取注记点:"))
(command "text" p 2.0 0 d)
)
)
(entdel en)
(setvar "bylayer")
)
(prin1)
)
|
|