안녕하세요
원형넘버링 캐드리습 질문드립니다.
이 리습은 원형이나 폰트사이즈가 고정입니다.
이 리습에 폰트사이즈 입력을 할수있게 수정하려면 어떤 부분을 수정해야 하나요?
폰트사이즈에 맞게 원형사이즈도 저절로 늘어나는…
고수님들 도와주세요~
(defun c:tt(/ ss en n n1 k tot dis dis1 siz bas bas2 x1 y1 t1 text_out r th pnt msg k)
(prompt “nCommand: Line Plus…”)
; 글자크기 지정
;(setq siz (* 20 (getvar “dimscale”)))
(setq siz (getvar “TEXTSIZE”))
(setq siz (getreal (strcat “n글자크기를 지정해 주세요 <” (rtos siz) “>: “)))
(if (not siz) (setq siz (getvar “TEXTSIZE”)))
(setq r 10 ; 원의 반지름
th (getint “시작번호를 입력하세요 <1>:”) ; TT 넘버링 시작번호
)
(if (= th nil)(setq th 1))
(setq msg (strcat “넘버링 위치를 클릭하세요 <” (rtos th 2 0) “>:”))
(initget 128)
(while (setq pnt (getPoint msg)) ; 넘버링 위치
(setq a (entlast))
(if (= (type pnt) ‘LIST)
(progn
(command “circle” Pnt r) ; 원 그리기
(command “text” “j” “mc” pnt “6” “0” th) ; 텍스트 쓰기
(setq k (ssadd))
(while (setq a (entnext a))
(setq k (ssadd a k))
)
(command “Copybase” pnt k “”)
(command “Erase” k “”)
(command “Pasteblock” pnt)
(setq th (+ 1 th)) ; 1씩 + 하기
)
(if (= (strcase pnt) “B”)
(setq th (+ th 1))
(setq th (atoi pnt))
)
)
(initget 128)
(setq msg (strcat “넘버링 위치를 클릭하세요 <” (rtos th 2 0) “>:”))
)
(princ)
)
(defun c:tt(/ ss en n n1 k tot dis dis1 siz bas bas2 x1 y1 t1 text_out r th pnt msg k)
(prompt “nCommand: Line Plus…”)
; 글자크기 지정
;(setq siz (* 20 (getvar “dimscale”)))
(setq siz (getvar “TEXTSIZE”))
(setq siz (getreal (strcat “n글자크기를 지정해 주세요 <” (rtos siz) “>: “)))
(if (not siz) (setq siz (getvar “TEXTSIZE”)))
(setq r (* siz 1.5) ; 원의 반지름
th (getint “시작번호를 입력하세요 <1>:”) ; TT 넘버링 시작번호
)
(if (= th nil)(setq th 1))
(setq msg (strcat “넘버링 위치를 클릭하세요 <” (rtos th 2 0) “>:”))
(initget 128)
(while (setq pnt (getPoint msg)) ; 넘버링 위치
(setq a (entlast))
(if (= (type pnt) ‘LIST)
(progn
(command “circle” Pnt r) ; 원 그리기
(command “text” “j” “mc” pnt siz “0” th) ; 텍스트 쓰기
(setq k (ssadd))
(while (setq a (entnext a))
(setq k (ssadd a k))
)
(command “Copybase” pnt k “”)
(command “Erase” k “”)
(command “Pasteblock” pnt)
(setq th (+ 1 th)) ; 1씩 + 하기
)
(if (= (strcase pnt) “B”)
(setq th (+ th 1))
(setq th (atoi pnt))
)
)
(initget 128)
(setq msg (strcat “넘버링 위치를 클릭하세요 <” (rtos th 2 0) “>:”))
)
(princ)
)
(* siz 1.5) 원크기는 글씨크기 1.5배 이부분 수정하시면 됩니다.