(defun c:mj()
(if *error*
(command "_boundary" (setq p1 (getpoint "\n点取要标注的封闭区域内部一点:"))  "")
)
(setq EN (entlast))
(command "area" "o" EN)
(setq smj (getvar "area"))
(setq imj smj)
(setq smj (/ smj 1000000))
(setq smj (* smj 1))
(setq smj (rtos smj 2 2))
(setq smj (strcat "S=" smj "m2"))
  (if (=  htxt nil)
    (progn
      (setq htxt (/ (sqrt imj) 15))
      )
    )
(setq htxt1 (getdist (strcat "\n输入字体的高度<" (rtos htxt 2 1) ">:")))
  (if  htxt1 
    (setq htxt htxt1)
    )
(setq Pt (getpoint "\n 文字标注位置:"))
(command "style" "MJ" "txt.shx" htxt 0.8 "" "n" "" "")
(command "text" "s" "MJ" "j" "BC" pt "" smj "")
'(COMMAND "TEXT" Pt ffsize 0 smj)
) 