;;局部隐藏/显示 v1.0 by sailorcwx 2007.01 ;;隐藏的对象仅为临时隐藏,重生(REGEN)后将重新显示 (defun c:hredraw ( / YH_DOWHAT YH_INDEX YH_SELECTION YH_SELECTION1) (setq YH_selection (ssget)) (initget "H R") (setq YH_dowhat (GETKWORD "\n隐藏选择对象<H>;保留选择对象<R>")) (if (or (= YH_dowhat "R") (= YH_dowhat "r")) (progn (setq YH_selection1 (ssget "X")) (setq YH_index 0) (repeat (sslength YH_selection) (setq YH_selection1 (ssdel (ssname YH_selection YH_index) YH_selection1)) (setq YH_index (1+ YH_index)) ) (setq YH_selection YH_selection1) ) ) (setq YH_index 0) (repeat (sslength YH_selection) (redraw (ssname YH_selection YH_index) 2) (setq YH_index (1+ YH_index)) ) (princ) ) |