(defun c:xx( / TEX Q AR PT1 )
(graphscr)
(setvar “cmdecho” 0)
(setq number 0)
(if (and ( = asc nil)( = asc2 nil))(setq asc 1000))
(if (and ( = asc nil)( /= asc2 nil))(setq asc asc2))
(while (setq dum (bpoly (getpoint (strcat “n>> 면적 구할 곳을 피크하세요 <도면스케일 = 1/”(rtos asc 2 0)”>”))))
(command “AREA” “entity” dum)
(setq nu (getvar “AREA”))
(setq nu (* (/ (* asc asc) 1000000) nu))
(if ( = number nil)
(setq number 0))
(setq number ( + number nu))
(princ (strcat “면적 ==>”(rtos number 2 2)))
)
(setq AR (rtos number 2 1))
(if (and ( = th nil)( = th2 nil))(setq th 2))
(if (and ( = th nil)( /= th2 nil))(setq th th2))
(setq PT1 (getpoint (strcat “n>> 구한 면적을 텍스트로 써줄 인써트포인트를 피크하세요 <텍스트높이:”(rtos th 2 2)”>…”)))
(command “text” pt1 th “0” ar)
(setq number 0)
(setvar “cmdecho” 1)
)
면적을 찍는 리습입니다…. 이 명령어로 하면 소수점 1자리 까지 찍히는데
2자리까지 찍히면서 2자리는0으로 표시될수 있게 하는 방법이 있을까요???
공유