캐드 분류
리습 잘못된게 있는건가요?..
컨텐츠 정보
- 261 조회
- 0 추천
- 0 비추천
- 목록
본문
레이어선 정리하는 리습인데…
마지막 lal만 실행이 안되네요..ㅠㅠ
뭐가 잘못된건지 모르겠어요.
님들 가르쳐주세요.ㅠㅠ
(defun c:AF (/ acDoc acLay)
(vl-load-com)
(setq acDoc (vla-get-activedocument (vlax-get-acad-object)))
(setq acLay (vla-get-name (vla-get-activelayer acDoc)))
(vla-startundomark acDoc)
(vlax-for lay (vla-get-layers acDoc)
(if (not (= acLay (vla-get-name lay)))
(vla-put-LayerOn lay :vlax-false)
)
)(vla-endundomark acDoc)(princ)
)
(defun c:ff (/ acDoc ss layerList)
(vl-load-com)
(setq acDoc (vla-get-activedocument (vlax-get-acad-object)))
(vla-startundomark acDoc)
(and
(setq ss (ssget))
(setq layerList
(mapcar 'vla-get-layer
(mapcar 'vlax-ename->vla-object
(vl-remove-if 'listp (mapcar 'cadr (ssnamex ss)))
)
)
)
(vlax-for lay (vla-get-layers acDoc)
(if (member (vla-get-name lay) layerList)
(vla-put-LayerOn lay :vlax-false)
)
)
)(vla-endundomark acDoc)(princ)
)
(defun c:lol (/ acDoc ss layerList)
(vl-load-com)
(setq acDoc (vla-get-activedocument (vlax-get-acad-object)))
(vla-startundomark acDoc)
(and
(setq ss (ssget))
(setq layerList
(mapcar 'vla-get-layer
(mapcar 'vlax-ename->vla-object
(vl-remove-if 'listp (mapcar 'cadr (ssnamex ss)))
)
)
)
(vlax-for lay (vla-get-layers acDoc)
(if (not (member (vla-get-name lay) layerList))
(vla-put-LayerOn lay :vlax-false)
)
)
)(vla-endundomark acDoc)(princ)
)
(defun c:lal ()
(vla-startundomark acDoc)
(vlax-for lay (vla-get-layers acDoc)
(vla-put-LayerOn lay :vlax-true)
)
(vla-endundomark acDoc)(princ)
)(princ)
관련자료
댓글 0
/ 1 페이지
등록된 댓글이 없습니다.