캐드 분류
센터선 만들어 주는 리습인데 센터선 길이를 입력하라고 나오네요
컨텐츠 정보
- 146 조회
- 0 추천
- 0 비추천
-
목록
본문
안녕하세요~
센터선 만들어 주는 리습인데 센터선 길이를 입력하라고 나오네요
리습에서 그냥 5라고 자동 입력하게끔 할수 있는 기능은 없을까요?
고수수들 좀 알려주세요~ ㅎㅎ
(defun xlin_er (s)
(if (/= s "Function Cancelled")
(if (= s "quit / exit abort")
(princ)
(princ (strcat "nERROR:" s))
)
)
(setvar "osmode" oosmo)
(setvar "orthomode" ooth)
(setvar "highlight" ohig)
(setvar "ucsicon" oucn)
(setvar "cmdecho" ocmde)
(setq *error* olderr)
(princ)
)
;
(defun cen_er (s1)
(if (/= s1 "Function Cancelled")
(if (= s1 "quit / exit abort")
(princ)
(princ (strcat "nERROR:" s1))
)
)
(setvar "osmode" oosmo)
(setvar "osmode" os)
(setvar "gridmode" sgrid)
(setvar "highlight" ohig)
(setvar "ucsicon" oucn)
(command "ucs" "p")
(command "undo" "e")
(setvar "ucsfollow" sucsf)
(setvar "cmdecho" ocmde)
(setq *error* olderr)
(princ)
)
(defun dtr (dtr1)
(* pi (/ dtr1 180.00))
)
;——————————————————————–
(defun c:AAA (/ ocmde oosmo tb1 an1 op p3 p4 p5 p6 p7 p8 e1 e2 p10
e3 e4 e5 e6 dih len olderr ol po ooth tb2 p9 ang dis
po1 pt1 pt2 ag2 ag3 di ag1 ag4 pk p1 p2 t1 t2 thk cen
d es rad sucsf oucn sgrid p11 deg f f10 f11 fl hd p1k
pf pk1 px py s s10 s11 sl ohig ds1 ds2 ds3 pc pe1 ans
py1 py2 py3 py4 br sd sl cd)
(setq olderr *error* *error* xlin_er)
(setq ocmde (getvar "cmdecho"))
(setq ooth (getvar "orthomode"))
(setq ohig (getvar "highlight"))
(setq oucn (getvar "ucsicon"))
(setq osm (getvar "osmode"))
(setvar "cmdecho" 0)
(setvar "ucsicon" 2)
(setvar "highlight" 1)
(setq tb1 (tblsearch "LAYER" "1″))
(if (= tb1 nil)
(command "layer" "n" "center" "c" 1 "center" "lt" "center" "center" "")
)
(progn
(command "ucs" "")
(command "undo" "group")
(setq sgrid (getvar "gridmode"))
(setvar "gridmode" 0)
(setq sucsf (getvar "ucsfollow"))
(setvar "ucsfollow" 0)
(setq olderr *error* *error* cen_er)
(setq es (entsel "nSelect arc or circle: "))
(if es
(progn
(setq es (car es))
(redraw es 3)
(if (and
(/= (cdr (assoc 0 (entget es))) "ARC")
(/= (cdr (assoc 0 (entget es))) "CIRCLE")
)
(progn (prompt "nentity is a ")
(princ (cdr (assoc 0 (entget es))))
(setq es nil)
)
)
)
(exit)
)
(command "ucs" "e" es)
(setq cen (trans (cdr (assoc 10 (entget es))) es 1))
(setq rad (cdr (assoc 40 (entget es))))
(prompt "nRadius is ")
(princ (rtos rad))
(initget 6 "D")
(command "osnap" "qua")
(command "ortho" "on")
(setq d (getdist "nDrag/:"))
(if (= d nil) (progn (redraw es 4) (exit)))
(if (= d "D")
(progn
(command "osnap")
(initget 7)
(setq d (getdist cen "nPoint out of circle: "))
)
(setq d (+ rad d))
)
(command "line" (list (car cen) (- (cadr cen) d) (caddr cen))
(list (car cen) (+ (cadr cen) d) (caddr cen))
""
)
(command "change" "l" "" "p" "la" "1″ "")
(command "line" (list (- (car cen) d) (cadr cen) (caddr cen))
(list (+ (car cen) d) (cadr cen) (caddr cen))
""
)
(command "change" "l" "" "p" "la" "1″ "")
(setvar "ucsfollow" sucsf)
(setvar "gridmode" sgrid)
(setvar "osmode" osm)
(command "ucs" "p")
(redraw es 4)
(command "undo" "e")
)
)
) ;endif – center
;————————————————–
(command "redraw")
(setvar "highlight" ohig)
(setvar "ucsicon" oucn)
(setvar "osmode" oosmo)
(setvar "orthomode" ooth)
(setvar "cmdecho" ocmde)
(setq *error* olderr)
(princ)
)
;;;;;;;;;;
윈도우 10 씁니다~
좋은 하루 되세요~
관련자료
댓글 0
등록된 댓글이 없습니다.