소수점 4자리 또는 8자리까지 구할 수 있도록 수정하고 싶은데;;
어느부분을 수정해야되는지 모르겠습니다…고수님들 부탁드릴게요…(__)
(defun c:as(/ d_s ent_p ar_1 ar_2 py_1 py_2 t_p n_p)
(graphscr)
(setvar “cmdecho” 0)
(setq ltscale (getvar “ltscale”))
(command “units” “” “8” “” “” “” “”)
(setq ent_p (entsel “n Select Polyline!! :”))
(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 3.3058))
(setq py_2 (rtos py_1 2 2))
(command “units” “” “0” “” “” “” “”)
(prompt “nArea (M2):”)(princ ar_2)
(prompt “nArea (Py):”)(princ py_2)(princ)
(setq t_p (getpoint “nText Point:”))
(setq t_h (* ltscale 3))
(setq n_p (list (car t_p) (- (cadr t_p) (* t_h 2))))
(command “text” t_p t_h “” (strcat “* Area (M2) : ” ar_2))
(command “text” n_p t_h “” (strcat “* Area (Py) : ” py_2))
(setvar “cmdecho” 1)
(princ)
)
공유