구름마크 리습 질문드립니다
컨텐츠 정보
- 261 조회
- 2 댓글
- 0 추천
- 0 비추천
- 목록
본문
안녕하세요
제가 사용하고 있는 구름마크 쳐주는 리습입니다.
어디선가 받았는데 출처는 잘 모르겠네요
다름이 아니라 명령어를 치면 구름마크가 생성이 되는데
구름마크의 호 지름이 도면에 따라 자동으로 설정이 되는것 같습니다. 도면마다 다르게 뜨거든요
물론 호 지름 수정 가능하게 되어있습니다.
그런데 호 지름을 좀 크게 하고싶어서 수정하고 나서 그 다음에 다시 명령어를 치면 제가 설정한 호지름이 아니라 다시 처음 호 지름으로 나옵니다. ㅠㅠ
예를들어 처음에 명령어 CDT를 치면 호 지름이 3000이 자동으로 뜹니다. 근데 제가 좀 더 크게 하려고 10000을 입력하고 구름마크 생성 후에 다시 CDT 명령어를 치면 10000이 아니라 다시 3000으로 떠서 한 도면에서 명령어를 칠때마다 매번 10000으로 바꿔줘야 하는 번거로움이 있네요 ㅠㅠ
제가 설정한대로 계속 갈수 있게 하는 방법이 없을까요?
;CLOUD PROGRAM WRITTEN BY BRAD TEETERS 70402,2131
;FEEL FREE TO MODIFY AND/OR DISTRIBUTE THIS PROGRAM. IT IS FREE!
;
;To load, at the Command prompt type> (LOAD "CD")
;To execute program after loading type> CLOUD
;
(defun C:cdt (/ ds plw pt1 pt2 p1 p2 xdist ydist spcsx spcsy ent1 ent2 nxt info bulge data c_o c_l)
(print ">> Cloud Draw Tool…")
(setq c_o (getvar "osmode"))
(setvar "cmdecho" 0)
(setvar "osmode" 0)
(setq c_l (getvar "clayer")) ;<= 현재 레이어값을 저장한다.
(setq ly (tblsearch "layer" "Revision")) ;"레이어를 검색 없으면 레이어 생성
(if (= ly nil) (command "layer" "n" "Revision" ""))
(setvar "clayer" "Revision") ;<= 현재 레이어를 변경한다.
(setq ds (getvar "dimscale")
plw (* 0.02 ds)
oer *error*
bm (getvar "blipmode"))
(setq ds (* 30 ds))
(print) ; ————> circle size
(setq str (strcat "호 지름<" (rtos ds 2) "> : "))
(setq buf (getint str))
(if (/= buf NIL) (setq ds buf))
(defun *error* (s) ;start error routine
(setvar "blipmode" bm) ;reset blipmode
(princ (strcat "Exit…" s)) ;type error message
(if oer (setq *error* oer))
(princ))
(print)
(SETQ PT1 (GETPOINT "영역의 좌측 하단점: ")) (terpri)
(setq pt2 (getcorner pt1 "영역의 우측 상단점: "))
(setvar "blipmode" 0)
(setq p1 (car pt1) p2 (car pt2) ;find x distances
xdist (- p2 p1))
(setq p1 (cadr pt1) p2 (cadr pt2) ;find y distances
ydist (- p2 p1))
;******TO ADJUST SPACING OF ARCS CHANGE THE NUMBER 2 IN THE NEXT TWO LINES*****
(setq spcsx (/ (abs xdist) (/ ds 2)) ;X spacing
spcsy (/ (abs ydist) (/ ds 2))) ;Y spacing
(if (= spcsx (fix spcsx)) (setq spcsx (fix spcsx)) (setq spcsx (+ 1 (fix spcsx))))
(if (= spcsx 1) (setq spcsx 2)) ;min of 2 spaces
(if (= spcsy (fix spcsy)) (setq spcsy (fix spcsy)) (setq spcsy (+ 1 (fix spcsy))))
(if (= spcsy 1) (setq spcsy 2)) ;min of 2 spaces
(setq xdist (/ xdist spcsx) ydist (/ ydist spcsy)) ;set distances
(setq p1 pt1) ;set polyline start point
(command "PLINE" p1 "W" "0″ "") ;start polyline command
(repeat spcsx ;draw bottom line segments
(setq p1 (polar p1 0.0 (abs xdist)))
(command p1))
(repeat spcsy ;draw right line segments
(setq p1 (polar p1 (/ pi 2) (abs ydist)))
(command p1))
(repeat spcsx ;draw top line segments
(setq p1 (polar p1 pi (abs xdist)))
(command p1))
(repeat (- spcsy 1) ;draw left line segments
(setq p1 (polar p1 (* pi 1.5) (abs ydist)))
(command p1))
(command "C") ;Close polyline
(setq ent1 (entlast) ;get entity
ent2 (entget ent1) ;get entity info
;******TO ADJUST THE ARC SIZE ADJUST THE 0.5 BELOW*******
bulge (list (cons 42 0.5)) ;build cloud arcs 0.5
nxt (cdr (assoc -1 ent2)) ;set for lookup
nxt (entnext nxt) ;get next one
plw (list (cons 41 plw))) ;build cloud width
(if (= nxt nil)
(progn
(setq ent2 (subst (cons 42 0.5) (assoc 42 ent2) ent2))
(entmod ent2) ;modify entity
)
(while nxt ;start loop
(setq info (entget nxt) ;get exist. info
info (append info bulge) ;set bulge
info (append info plw) ;set width
) ;end of setq
(entmod info) ;modify entity
(setq nxt (entnext nxt)) ;get next segment
) ;end of while
)
(entupd ent1) ;update entity
(setvar "blipmode" bm) ;reset blipmode
(setvar "cmdecho" 1) ;turn command echo on
(setvar "osmode" c_o)
(setvar "clayer" c_l) ;<= 저장된 값으로 현재 레이어를 변경한다.
(gc) (princ) ;print blank line
(setq osm(getvar "osmode"))
) ;End program