1. 컴퓨터 사양 (간략히) : 조립,i5, gtx460
2. 캐드버전 과 종류 : – 오토캐드2008 Full /LT
3. 운영체제(윈도우)버전과 비트수 : – Windows xp 32비트
4. 보조프로그램 사용유무 : – 드림(DREAM)
배열을
( 0 0 0 0 0 0 0 0 0 0 0 ~)
이런식으로 작성했는데
( 0 0 0 0 0 0 0 1 0 0 0 0 ~)
n번째만 삭 바꿀 수 없나요?
라고 질문 했는데요——————————————————
(defun Haru_listChage(lis aix num / VtxList)
(setq VtxList ‘() n 0)
(mapcar ‘(lambda (a)
(if (/= n num)
(setq VtxList (append VtxList (list a)))
(setq VtxList (append VtxList (list aix)))
)
(setq n (1+ n))
)
lis
)
VtxList
)
(Haru_listChage chak_st 1 1)
라고 답변 받았고요 —————————————————–
(defun Haru_listChage(lis aix num / VtxList)
(setq VtxList ‘() n 0)
(mapcar ‘(lambda (a)
(if (/= n num)
(setq VtxList (append VtxList (list a)))
(setq VtxList (append VtxList (list aix)))
)
(setq n (1+ n))
)
lis
)
VtxList
)
(defun c:BBB()
(vl-load-com)
(setq chak_st nil)
(repeat 10
(setq chak_st (append chak_st (list 0) ))
)
(princ chak_st)
(repeat 10
(progn (Haru_listChage chak_st 1 1) )
)
(princ chak_st)
)
이리 짜봤는데요——————————————————
결과가 그리 좋치 않아요
머가 문제 일까요?
변경한 값을 변수에 넣지 않으셨네요
(defun c:BBB ( / lst )
(repeat 10
(setq lst (append lst (list 0) ))
)
(princ “nA : “) (princ lst)
(setq lst (Haru_listChage lst 1 1))
(princ “nB : “) (princ lst)
(princ)
)
아악! 어려워~
저 지송하지만 변화가 없는데요 ㅜ.ㅜ;;;
—————————————————————–
(defun Haru_listChage(lis aix num / VtxList)
(setq VtxList ‘() n 0)
(mapcar ‘(lambda (a)
(if (/= n num)
(setq VtxList (append VtxList (list a)))
(setq VtxList (append VtxList (list aix)))
)
(setq n (1+ n))
)
lis
)
VtxList
)
(defun c:BBB(/ chak_st )
(vl-load-com)
(setq chak_st nil)
(repeat 10
(setq chak_st (append chak_st (list 0) ))
)
(princ chak_st)
(repeat 10
(progn (Haru_listChage chak_st 1 1) )
)
(princ chak_st)
)
아 해결되었어여 하루님, 태은님 감사합니다.
결정적으로 바꾼 값을 셋큐하지 않은게 잘못이네요 ㅋㅋ
암튼 감사하고 올해 많이 버세요~