면적 리습 소수점 다섯째자리로 수정하는 방법 알려주세요.
컨텐츠 정보
- 321 조회
- 2 댓글
- 0 추천
- 0 비추천
-
목록
본문
(defun c:ae(/ choi d_ts w_os grpt pt1 ent1 en1 ar1 ar2 ar3 ar4 ar5 an arm ht)
(setq choi (getvar "orthomode") d_ts (getvar "textsize")
w_os (getvar "osmode") )
;;(setvar "orthomode" 0) (setvar "osmode" 0)
(setq ht d_ts)
(prompt "nText Height<") (prin1 ht) (prompt ">: ")
(setq ht (getdist))
(if (= ht nil) (setq ht d_ts))
(setq ent1 (entsel "nPline 선택->"))
(setq en1 (car ent1)) (redraw en1 3)
(setq grpt (grread T))
(setq pt1 (cadr grpt))
(command "area" "e" ent1)
(setq ar1 (/ (getvar "area") 1.0e+02))
(setq ar2 (rtos ar1 2 0))
(setq an (strlen ar2))
(setq arm (substr ar2 (- an 1) 1))
(setq arm (atof arm))
(setq ar3 (atoi ar2))
(if (>= arm 5)(progn
(setq ar3 (+ ar3 100))
))
(setq ar3 (rtos ar3 2 0))
(setq ar4 (strcat (substr ar3 1 (- an 4)) "." (substr ar3 (- an 3) 2) ))
(if (= (substr ar4 1 1) ".") (setq ar4 (strcat "0″ ar4)))
(setq ar5 (strcat (substr ar2 1 (- an 4)) "." (substr ar2 (- an 3) 5) ))
(if (= (substr ar5 1 1) ".") (setq ar5 (strcat "0″ ar5)))
(prompt "nArea : ")(prin1 ar5) (prompt " or ")(prin1 ar4)(terpri)
(command "text" "j" "r" pt1 ht "0″ ar5)
(prompt "nEnter text point->")
(command "move" "l" "" pt1 pause)
(redraw en1 4)
(setvar "orthomode" choi) (setvar "osmode" w_os)
(prin1)
)