- (defun c:tt(/ ptlst ss ss2)
- (setq ss(ssget '((0 . "LWPOLYLINE")(90 . 4))))
- (foreach ty (vl-remove-if-not '(lambda (x) (= (type x) 'ENAME)) (mapcar 'cadr (ssnamex ss)))
- (if (entget ty)
- (progn
- (setq ptlst nil)
- (foreach x (entget ty) (if (= (car x) 10) (setq ptlst (cons (cdr x) ptlst))))
- (setq ss2 (ssget "CP" ptlst))
- (if(ssmemb ty ss2)(ssdel ty ss2))
- (foreach ty (vl-remove-if-not '(lambda (x) (= (type x) 'ENAME)) (mapcar 'cadr (ssnamex ss2)))
- (if(ssmemb ty ss)(ssdel ty ss))
- )
- )
- )
- )
- (sssetfirst nil ss)
- (princ)
- )
|