- ;; bfyc(部分隐藏)
- (defun c:bfyc ()
- (princ "【部分隐藏】")
- (if (setq ss (ssget))
- (progn
- (setq mode t a 1)
- (while mode
- (setq ukw (Ukword 1 "1 2" "1-隐藏显示切换/2-退出" ukw))
- (if (= ukw "2")
- (setq mode nil)
- (cond ((and (= ukw "1") (= a 1))
- (SS-VS ss :vlax-false)
- (setq a 0)
- )
- ((and (= ukw "1") (= a 0))
- (SS-VS ss :vlax-true)
- (setq a 1)
- )
- )
- )
- )
- )
- )
- (princ)
- )
- ;; 对象显示与隐藏
- (defun SS-VS (ss mode)
- (if (= (type ss) 'PICKSET)
- (vlax-for OBJ (vla-get-activeselectionset (vla-get-activedocument (vlax-get-acad-object)))
- (if (/= (vla-get-visible OBJ) mode)
- (vla-put-visible OBJ mode)
- )
- )
- )
- )
|