例子
(setq ss2(SS_REMOVETYPES ss '("LINE")))
- (defun SS_RemoveTypes ( ss TypeLst / cnt ss1 ssl ename entl en )
- (setq ss1 nil)
- (if (and ss (> (setq ssl (sslength ss)) 0))
- (progn
- (setq
- cnt 0
- ss1 (ssadd)
- )
- (repeat ssl
- (setq
- ename (ssname ss cnt)
- entl (entget ename)
- en (LI_item 0 entl)
- cnt (1+ cnt)
- )
- (if (not (member en TypeLst))
- (ssadd ename ss1)
- )
- )
- ))
- (if (and ss1 (> (sslength ss1) 0)) ss1 nil)
- )
- (defun LI_item (n alist)
- (cdr (assoc n alist))
- )
|