” ARPY ” 면적 / 평 구하는 리습을 고캐드에서 찾아서 사용하려고하는데요//
(setq t_h (getreal “nText의 크기를 입력하세요 :”))
이 것 때문인제 계속 면적 구할때 마다 글자크기를 넣어야 되서 작업속도가
느려지는데 수정좀 도와주세요..ㅜㅠ
1. 글자크기를 한번만 넣으면 계속 사용할 수 있도록 수정부탁드립니다.
2. 그것이 힘들다면 글자크기를 150~200 정도로 고정해서 사용할 수 있도록 수정 부탁드립니다.
꼭좀 도와주세요..ㅠ
(defun c:ar1(/ d_s ent_p ar_1 ar_2 py_1 py_2 t_p n_p)
(graphscr)
(setvar “cmdecho” 0)
(setvar “dimzin” 1)
(setq d_s (getvar “dimscale”))
(command “units” “” “8” “” “” “” “”)
(setq ent_p (entsel “n pline을 선택하세요!! :”))
(command “area” “e” ent_p)
(setq ar_1 (/ (getvar “area” ) 1.0e+06))
(setq ar_2 (rtos ar_1 2 2))
(setq py_1 (* ar_1 0.3025)) ;평으로 환산 M²* 0.3028
(setq py_2 (rtos py_1 2 2))
(command “units” “” “0” “” “” “” “”)
(setq t_p (getpoint “nText가 입력될 위치에 Click 하세요 :”))
(setq t_h (getreal “nText의 크기를 입력하세요 :”))
(prompt “nArea : “)(princ ar_2)(princ ” M²”)
(prompt “nArea : “)(princ py_2)(princ ” 평”)(princ)
(setq n_p (list (car t_p) (- (cadr t_p) (* t_h 2))))
(command “text” t_p t_h “” (strcat ar_2 ” M² ” ))
(command “text” n_p t_h “” (strcat py_2 ” 평 “))
(setvar “cmdecho” 1)
(princ)
)