눈팅만 하다 이렇게 질무을 올리네요.
2008에서 잘되던 리습이 2010에서는 안되네요..
왜그렇죠? ㅜ.ㅜ
<<선택한수 합>>
(defun c:12 (/ e Pnt n i var)
(setq e (ssget ‘((-4 . “<or”)(0 . “TEXT”)(0 . “MTEXT”)(-4 . “or>”)))
Pnt (getPoint “nPick Point : “)
th (getdist “nText Height : “)
n (sslength e)
i 0
sum 0
)
(repeat n
(setq var (entget (ssname e i))
num1 (assoc 1 var)
num2 (cdr num1)
num3 (atof num2)
sum (+ sum num3)
i (1+ i)
)
)
(setq sumtext (rtos sum))
(command “text” pnt th “0” sumtext)
(princ))
<< 숫자 증감 >>
(defun c:add(/ ss num k ed txt n numt q len @1 @2 txt1 txt2 txt3 newtxt)
(prompt “n>> 입력수치로 숫자만 증감시키기”)
(setq ss (ssget (list (cons 0 “text,mtext”))))
(if (not $num) (setq $num 1))
(setq num (getint (strcat “n증가할 수치<” (rtos $num 2 0) “>:”)))
(if num (setq $num num))
(setq k 0)
(repeat (sslength ss)
(setq ed (entget (ssname ss k)))
(setq txt (cdr (assoc 1 ed)))
(setq n 1 numt “” q 0 len (strlen txt))
(repeat len
(setq @1 (substr txt n 1))
(setq @2 (ascii @1))
(if (and (>= @2 48) (<= @2 57))
(progn
(setq numt (strcat numt @1))
(setq q n)
)
)
(setq n (1+ n))
)
(setq txt1 (substr txt 1 (- q (strlen numt))))
(setq txt2 (rtos (+ (atof numt) $num) 2 0))
(setq txt3 (substr txt (1+ q) (- len q)))
(setq newtxt (strcat txt1 txt2 txt3))
(entmod (subst (cons 1 newtxt) (assoc 1 ed) ed))
(setq k (1+ k))
)
(princ)
)
경로지정도하고.로드도 해봤는데… 안되네요.ㅠ.ㅠ
고수님을 알려주세요.
네… 2010 64BIT버젼 VBA 설치했는데.. 안되네요.
뭐가 문제인지 몇개 되던 리습도 안되네요.ㅠ.ㅠ
아무것도 안되네요.
꼭 그런 것은 아니죠…
http://www.autodesk.com/vba-download 여기로 가셔서 캐드 버젼에 맞는 VBA모듈을 설치 해야 합니다.
리습 자체는 문제가 없어요.
캐드 2009버젼 부터는 VBA모듈을 설치해야 리습이 사용 가능 합니다.