;;区域面积
(defun c:AreaOfBoundary	(/ la pt reg)
  (princ
    "\n*****请用textsize命令设置当前字高,标注精度受当前标注样式控制*****"
  )
  (setq pt (getpoint "\n选取区域内部一点:"))
  (or pt (fsxm-silenceexit))
  (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标记位置："))
	(entmake
	  (list
	    (cons 0 "TEXT")		;实体类型
	    (cons 10 (trans pt 1 0))	;插入位置
	    (cons 40 (getvar "textsize")) ;文字高度
	    (cons 1 (rtos (getvar "area")))
					;文字内容
	    (cons 7 (getvar "textstyle")) ;文字样式
	  )
	)
      )
      (entdel reg)
    )
  )
  (princ)
)