XYAOJUE 发表于 2016-11-19 22:43:30

用这个标注面积LSP加周长一起标

(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 "㎡"))
(if (=htxt nil)
    (progn
      (setq htxt (/ (sqrt imj) 15))
      )
    )
(setq htxt1 (getdist (strcat "\n输入字体的高度<" (rtos htxt 2 1) ">:")))
(ifhtxt1
    (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)
)

whf1074302172 发表于 2016-12-7 14:04:57

shenmeshenmeshenmeshenmeshenmeshenmeshenmeshenme
页: [1]
查看完整版本: 用这个标注面积LSP加周长一起标