之前的代码直接在论坛里打的。这个直接返回非同心圆的选择集
- (Defun _Filter (ss / I RTN S10 SN VAL SS1)
- (setq i -1)
- (repeat (sslength ss)
- (setq sn (ssname ss (setq i (1+ i)))
- s10 (vl-prin1-to-string (cdr (assoc 10 (entget sn))))
- )
- (if (null (setq val (cdr (assoc s10 rtn))))
- (setq rtn (cons (list s10 sn) rtn))
- (setq rtn (subst (cons s10 (cons sn val)) (assoc s10 rtn) rtn))
- )
- )
- (setq rtn (mapcar 'cdr rtn)
- rtn (vl-remove-if '(lambda (x) (cdr x)) rtn)
- rtn (mapcar 'car rtn)
- ss1 (ssadd)
- )
- (mapcar '(lambda (x) (ssadd x ss1)) rtn)
- ss1
- )
|