어제까지는 잘 썼었는데 왜 갑자기 안되는지 이유를 모르겠네요..
리습을 건든것두 아닌데…..
답변좀 부탁드립니다.
ㅠㅠ
(defun C:BE (/
ds osmode c-lay p1 p2 ang w4 ys pt pt1 pt2 pt3 pt4 pt5 txt ;지역변수 정의
)
(defun SETERR(s)
(if (/= s “Function cancelled”)
(princ (strcat “nError: ” s))
); of If
(setq *error* oer seterr nil)
(princ)
); of SETERR
(setq oer *error* *error* seterr)
(push-env) ;환경변수 대피
(setvar “blipmode” 1)
(setq ds (getvar “DIMSCALE”) ;시스템변수
osmode (getvar “osmode”))
(setvar “osmode” 0)
(setq c-lay (getvar “CLAYER”)) ; current layer 저장
(command “layer” “m” “tt” “c” “5” “” “”) ; layer name 생성
(while (setq p1 (getpoint “nFirst point: “)) ;기준선 시점
(setq p2 (getpoint p1 “nSecond point: “)) ;기준선 종점
(setq ang (angle p1 p2) ;ang
w4 (which4 ang)) ;사분점
(if (or (= w4 1) (= w4 4)) ;1,4쫭죇랭뎩턿
(setq ys (* -1 ds)) ;y-scale = 1
(setq ys (* 1 ds)) ;y-scale = -1
) ;of if
(setq pt1 (polar p1 ang (* 0 ds)))
(setq pt2 (polar p1 ang (* 8 ds)))
(setq pt3 (polar p1 ang (* 15 ds)))
(setq pt4 (polar pt2 (+ ang (* ys pi)) (* 3 ds)))
(setq pt5 (polar pt4 (+ ang (* ys (* pi 1.5))) (* 0.8 ds)))
(command “pline” pt1 pt2 “”)
(command “solid” pt2 pt4 pt5 “” “”)
(setq txt (getstring “nEnter TYPE (측구형식:V-1/U-2/L-3/B-4): “)) ;측구형식 입력
(if (= txt “”)
(setq txt “T”)
);of if
(cond ;단축key
((= txt “10”) (setq txt “V”))
((= txt “11”) (setq txt “V1”))
((= txt “12”) (setq txt “V2”))
((= txt “13”) (setq txt “V3”))
((= txt “14”) (setq txt “V4”))
((= txt “15”) (setq txt “V5”))
((= txt “16”) (setq txt “V6”))
((= txt “17”) (setq txt “V7”))
((= txt “18”) (setq txt “V8”))
((= txt “19”) (setq txt “V9”))
((= txt “20”) (setq txt “U”))
((= txt “21”) (setq txt “U1”))
((= txt “22”) (setq txt “U2”))
((= txt “23”) (setq txt “U3”))
((= txt “24”) (setq txt “U4”))
((= txt “25”) (setq txt “U5”))
((= txt “26”) (setq txt “U6”))
((= txt “27”) (setq txt “U7”))
((= txt “28”) (setq txt “U8”))
((= txt “29”) (setq txt “U9”))
((= txt “30”) (setq txt “L”))
((= txt “31”) (setq txt “L1”))
((= txt “32”) (setq txt “L2”))
((= txt “33”) (setq txt “L3”))
((= txt “34”) (setq txt “L4”))
((= txt “35”) (setq txt “L5”))
((= txt “36”) (setq txt “L6”))
((= txt “37”) (setq txt “L7”))
((= txt “38”) (setq txt “L8”))
((= txt “39”) (setq txt “L9”))
((= txt “40”) (setq txt “B”))
((= txt “41”) (setq txt “B1”))
((= txt “42”) (setq txt “B2”))
((= txt “43”) (setq txt “B3”))
((= txt “44”) (setq txt “B4”))
((= txt “45”) (setq txt “B5”))
((= txt “46”) (setq txt “B6”))
((= txt “47”) (setq txt “B7”))
((= txt “48”) (setq txt “B8”))
((= txt “49”) (setq txt “B9”))
(txt (setq txt (strcase txt))) ;형식외는 입력문자를 대문자로 변환
)
(command “STYLE” “STANDARD” “HY그래픽M” “” “” “” “” “”)
(if (or (= w4 1) (= w4 4)) ;1,4쫭죇랭뎩턿
(command “TEXT” “J” “mc” pt3 (* ds 2.0) (rtod ang) txt)
(command “TEXT” “J” “mc” pt3 (* ds 2.0) (rtod (+ ang pi)) txt)
) ;of if
) ;of while
(setvar “osmode” osmode)
(setvar “clayer” c-lay) ; LAYER 복원한다
(pop-env) ;환경변수 복귀
(setq *error* oer seterr nil)
(princ)
) ;of defun