리습(Lisp)글자크기 조절 관련하여 질문 드립니다.
컨텐츠 정보
- 208 조회
- 3 댓글
- 0 추천
- 0 비추천
- 목록
본문
아이소 치수 리습인데요 현재 글자 크기가 2로 나오는데~~~
크기를 2.5로 변경 하고 싶은데 메모장에서 어떤 부분을 수정해야 할지 잘 모르겠어요
고수님들 부탁드려욤~~
;=================================================
;**Error**Cancle**
(defun gerr (g)
(if (/= g "Function cancelled")
(princ (strcat "nError:" g))
)
(setvar "cmdecho" 1)
(command"pickbox" "4″ "")
(SETVAR "CLAYER" "PIPE")
)
(defun ddimen(/ pt1 pt2 pt3 pt4 pt5 pt6 pt7 pt8 pt9 pt10 ang t_ang g_ang l_dist t_dist str)
;(setiso1)
(setvar "osmode" 33)
(setq ds (getvar "dimscale"))
(setq cor_sty (getvar "textstyle"))
(command "layer" "s" "dim" "")
(if (/= dwgtype "D")
(command "layer" "f" "dim" "")
)
(setq pt1 (getpoint "nPick iso 치수보조선 시작 point : ")
;(if *error* (setq *error* gerr))
pt2 (getpoint "nPick iso 치수보조선 끝난 point : " pt1)
pt3 (getpoint "nPick iso 치수선 position : " pt2)
ang (angle pt1 pt2) ; dimension line angle
t_ang (angle pt2 pt3) ; text style angle
g_ang (angtos ang) ; function angle
l_dist (distance pt1 pt2) ; dimension line distance
t_dist (* 15 ds) ; dimension line distance
pt3 (polar pt1 t_ang t_dist)
pt4 (polar pt2 t_ang t_dist)
pt5 (polar pt3 ang (/ (distance pt1 pt2) 3))
pt7 (polar pt3 t_ang (* 1 ds))
pt8 (polar pt4 t_ang (* 1 ds))
pt9 (polar pt1 t_ang (* 1 ds))
pt10(polar pt2 t_ang (* 1 ds))
str (getstring "nInput 숫자입력 : ")
)
(if (or (and (>= (rtd ang) 61) (<= (rtd ang) 120))
(and (>= (rtd ang) 241) (<= (rtd ang) 300))
)
(setq pt6 (polar pt5 (dtr 210) (* 1.4 ds)))
(setq pt6 (polar pt5 (dtr 90) (* 1.4 ds)))
)
(setvar "osmode" 0)
(command "line" pt9 pt7 "")
(command "line" pt3 pt4 "")
(command "line" pt10 pt8 "")
(daa pt3 ang)
(daa pt4 (+ ang (dtr 180)))
(command "layer" "s" "dim" "")
(i_t pt6 ang str)
(setq q_con (strcase (getstring "n연속 치수기입? < Yes / No > : ")))
(if (= q_con "N")(setq jhg nil)(setq jhg 7))
(while jhg
(command "layer" "s" "dim" "")
(setvar "osmode" 33)
(setq pt1 pt2)
(setq pt2 (getpoint "nPick iso 치수보조선 끝난 point : " pt1))
(if (= pt2 nil)
(setq jhg nil)
(progn
(setq pt3 (getpoint "nPick iso 치수선 position : " pt2)
ang (angle pt1 pt2) ; dimension line angle
t_ang (angle pt2 pt3) ; text style angle
g_ang (angtos ang) ; function angle
l_dist (distance pt1 pt2) ; dimension line distance
t_dist (* 15 DS) ; dimension line distance
pt3 (polar pt1 t_ang t_dist)
pt4 (polar pt2 t_ang t_dist)
pt5 (polar pt3 ang (/ (distance pt1 pt2) 3))
pt7 (polar pt3 t_ang (* 1 DS))
pt8 (polar pt4 t_ang (* 1 DS))
pt9 (polar pt1 t_ang (* 1 DS))
pt10(polar pt2 t_ang (* 1 DS))
str (getstring "nInput 숫자입력 : ")
)
(if (or (and (>= (rtd ang) 61) (<= (rtd ang) 120))
(and (>= (rtd ang) 241) (<= (rtd ang) 300))
)
(setq pt6 (polar pt5 (dtr 210) (* 1.4 DS)))
(setq pt6 (polar pt5 (dtr 90) (* 1.4 DS)))
)
(setvar "osmode" 0)
(command "line" pt9 pt7 "")
(command "line" pt3 pt4 "")
(command "line" pt10 pt8 "")
(daa pt3 ang)
(daa pt4 (+ ang (dtr 180)))
(command "layer" "s" "dim" "")
(i_t pt6 ang str)
)
)
)
(if (/= dwgtype "D")
(command "layer" "t" "ghkiso" "")
)
(setvar "textstyle" cor_sty)
(setiso2)
(prin1)
)
;=================================================
(defun i_t(g_pt g_ang g_str)
(if (= text-type 2)
(progn
(if (not (tblsearch "style" "Text1″))
(progn
(SETVAR "CECOLOR" "bylayer")
(command "filedia" "0″)
(command "style" "Text1″ "romans" "" "0.9″ "30″ "" "" "")
(command "filedia" "1″)
)
)
(if (not (tblsearch "style" "Text2″))
(progn
(SETVAR "CECOLOR" "bylayer")
(command "filedia" "0″)
(command "style" "Text2″ "romans" "" "0.9″ "-30″ "" "" "")
(command "filedia" "1″)
)
)
)
)
(cond
((and (>= (rtd g_ang) 15) (<= (rtd g_ang) 60))
(if (= text-type 2)
(if (or (and (>= (rtd t_ang) 61) (<= (rtd t_ang) 120)) (and (>= (rtd t_ang) 241) (<= (rtd t_ang) 300)))
(setvar "textstyle" "Text1″)
(setvar "textstyle" "Text2″)
)
(setvar "textstyle" "dim")
)
;(SETVAR "CECOLOR" "7″)
(command "text" "c" g_pt (* txt-dh ds) "30″ g_str)
(SETVAR "CECOLOR" "bylayer")
)
((and (>= (rtd g_ang) 61) (<= (rtd g_ang) 120))
(if (= text-type 2)
(if (or (and (>= (rtd t_ang) 15) (<= (rtd t_ang) 60)) (and (>= (rtd t_ang) 181) (<= (rtd t_ang) 240)))
(setvar "textstyle" "Text2″)
(setvar "textstyle" "Text1″)
)
(setvar "textstyle" "dim")
)
;(SETVAR "CECOLOR" "7″)
(command "text" "c" g_pt (* txt-dh ds) "90″ g_str)
(SETVAR "CECOLOR" "bylayer")
)
((and (>= (rtd g_ang) 121) (<= (rtd g_ang) 180))
(if (= text-type 2)
(if (or (and (>= (rtd t_ang) 15) (<= (rtd t_ang) 60)) (and (>= (rtd t_ang) 181) (<= (rtd t_ang) 240)))
(setvar "textstyle" "Text1″)
(setvar "textstyle" "Text2″)
)
(setvar "textstyle" "dim")
)
;(SETVAR "CECOLOR" "7″)
(command "text" "c" g_pt (* txt-dh ds) "330″ g_str)
(SETVAR "CECOLOR" "bylayer")
)
((and (>= (rtd g_ang) 181) (<= (rtd g_ang) 240))
(if (= text-type 2)
(if (or (and (>= (rtd t_ang) 61) (<= (rtd t_ang) 120)) (and (>= (rtd t_ang) 241) (<= (rtd t_ang) 300)))
(setvar "textstyle" "Text1″)
(setvar "textstyle" "Text2″)
)
(setvar "textstyle" "dim")
)
;(SETVAR "CECOLOR" "7″)
(command "text" "c" g_pt (* txt-dh ds) "30″ g_str)
(SETVAR "CECOLOR" "bylayer")
)
((and (>= (rtd g_ang) 241) (<= (rtd g_ang) 300))
(if (= text-type 2)
(if (or (and (>= (rtd t_ang) 15) (<= (rtd t_ang) 60)) (and (>= (rtd t_ang) 181) (<= (rtd t_ang) 240)))
(setvar "textstyle" "Text2″)
(setvar "textstyle" "Text1″)
)
(setvar "textstyle" "dim")
)
;(SETVAR "CECOLOR" "7″)
(command "text" "c" g_pt (* txt-dh ds) "90″ g_str)
(SETVAR "CECOLOR" "bylayer")
)
((and (>= (rtd g_ang) 301) (<= (rtd g_ang) 360))
(if (= text-type 2)
(if (or (and (>= (rtd t_ang) 61) (<= (rtd t_ang) 120)) (and (>= (rtd t_ang) 241) (<= (rtd t_ang) 300)))
(setvar "textstyle" "Text2″)
(setvar "textstyle" "Text1″)
)
(setvar "textstyle" "dim")
)
;(SETVAR "CECOLOR" "7″)
(command "text" "c" g_pt (* txt-dh ds) "330″ g_str)
(SETVAR "CECOLOR" "bylayer")
)
)
(SETVAR "CLAYER" "PIPE")
(SETVAR "CECOLOR" "BYLAYER")
(princ)
)
(defun daa (g_pt g_ang / pt3 pt4)
(setq as (* 0.4 ds);;arrow hight
pt21 (polar g_pt g_ang (* 3 ds));;arrow length
;pt21 (polar g_pt g_ang (* 2.5 s));;arrow length(화살표길이)
g_ang (angtos g_ang)
)
(setq pt3 (polar pt21 t_ang as)
pt4 (polar pt21 (+ t_ang (dtr 180)) as)
)
(command "solid" g_pt pt4 pt3 "" "")
(princ)
)
(defun dimen1(/ n-len i sel l en el text pt1 pt2 pt3 pt4 pt5 pt6
pt7 pt8 pt9 pt10 ang t_ang g_ang l_dist t_dist str)
(setiso1)
(setvar "osmode" 33)
(setq n-len 0)
(setq i 0)
(setq sel(ssget))
(setq l(sslength sel))
(repeat l
(setq en(ssname sel i))
(setq el (entget en))
(if (= "TEXT" (cdr (assoc 0 el)))
(progn
(setq text (cdr (assoc 1 el)))
(setq n-len(+ n-len (atof text)))
(setq i(+ 1 i))
)
)
)
(setq n-len(rtos n-len 3 0))
(setq cor_sty (getvar "textstyle"))
(command "layer" "s" "dim" "")
(if (/= dwgtype "D")
(command "layer" "f" "ghkiso" "")
)
(setq pt1 (getpoint "nPick iso dimension start point : ")
pt2 (getpoint "nPick iso dimension end point : " pt1)
pt3 (getpoint "nPick iso dimension line position : " pt2)
ang (angle pt1 pt2) ; dimension line angle
t_ang (angle pt2 pt3) ; text style angle
g_ang (angtos ang) ; function angle
l_dist (distance pt1 pt2) ; dimension line distance
t_dist (* 15 ds) ; dimension line distance
pt3 (polar pt1 t_ang t_dist)
pt4 (polar pt2 t_ang t_dist)
pt5 (polar pt3 ang (/ (distance pt1 pt2) 3))
pt7 (polar pt3 t_ang (* 1 DS))
pt8 (polar pt4 t_ang (* 1 DS))
pt9 (polar pt1 t_ang (* 1 DS))
pt10(polar pt2 t_ang (* 1 DS))
)
(if (or (and (>= (rtd ang) 61) (<= (rtd ang) 120))
(and (>= (rtd ang) 241) (<= (rtd ang) 300))
)
(setq pt6 (polar pt5 (dtr 210) (* 1.4 ds)))
(setq pt6 (polar pt5 (dtr 90) (* 1.4 ds)))
) (setvar "osmode" 0)
(command "line" pt9 pt7 "")
(command "line" pt3 pt4 "")
(command "line" pt10 pt8 "")
(daa pt3 ang)
(daa pt4 (+ ang (dtr 180)))
(command "layer" "s" "dim" "")
(i_t pt6 ang n-len)
(if (/= dwgtype "D")
(command "layer" "t" "dim" "")
)
(setvar "textstyle" cor_sty)
(setiso2)
(prin1)
)