- ;; tt(批量删除方框内含相交的内容) 2015-03-17
- (defun c:tt ()
- (defun dxf (code s1) (cdr (assoc code (entget s1))))
- (setq ss (ssget '((0 . "lwpolyline")))
- i -1
- )
- (while (setq s1 (ssname ss (setq i (1+ i))))
- (if (and (= (dxf 70 s1) 1)
- (setq ptn (vl-remove-if-not '(lambda (x) (= (car x) 10)) (entget s1)))
- (setq ss1 (ssget "cp" (mapcar 'cdr ptn)))
- )
- (if (ssmemb s1 ss1)
- (command "erase" (ssdel s1 ss1) "")
- (command "erase" ss1 "")
- )
- )
- )
- (princ)
- )
|