;;区域面积
(defun c:AreaOfBoundary	(/ la pt reg)
  (cond	((setq pt (getpoint "\n选取区域内部一点:"))
	 (setq la (entlast))
	 (vl-cmdf ".BOUNDARY" "A" "O" "R" "" "NON" pt "")
	 (setq reg (entlast))
	 (if (equal la reg)
	   (princ "\n没有找封闭区域,程序退出....")
	   (progn
	     (command "._area" "o" reg)
	     (princ "\n所选区域面积为：")
	     (princ (rtos (getvar "area")))
	     (redraw reg 3)
	     (if (setq pt (getpoint "\n标记位置："))
	       (vl-cmdf ".text" pt "" "" (rtos (getvar "area")))
	     )
	     (entdel reg)
	   )
	 )
	)
  )
  (princ)
)