ssget如何不选择裁剪过的图块
请教各位老师,用ssget如何不选择裁剪过的图块?或者只选择裁剪过得块。看了下组码,裁剪过的都有类似这段组码:(102 . "{ACAD_XDICTIONARY") (360 . <图元名: -160b928>) (102 . "}")一下卡壳了,望不吝赐教谢谢
(defun c:tt ()
"选择非裁剪图块"
(if (setq ss (ssget '((0 . "INSERT"))))
(progn
(setq i -1
ss1 (ssadd)
)
(while (setq e (ssname ss (setq i (1+ i))))
(if (not (assoc 102 (entget e)))
(setq ss1 (ssadd e ss1))
)
)
(sssetfirst nil ss1)
)
)
(princ)
)
(defun c:tt ()
"选择裁剪图块"
(if (setq ss (ssget '((0 . "INSERT"))))
(progn
(setq i -1
ss1(ssadd)
)
(while (setq e (ssname ss (setq i (1+ i))))
(if (assoc 102 (entget e))
(setq ss1 (ssadd e ss1))
)
)
(sssetfirst nil ss1)
)
)
(princ)
)
;; tt(裁剪图块选择)
(defun c:tt ()
(if (and (setq ss (ssget "X" (list '(0 . "INSERT"))))
(setq lst (vl-remove-if-not
'(lambda (x) (xyp-DXF 102 x))
(xyp-Ss2List ss)
)
)
)
(sssetfirst nil (xyp-list2ss lst))
)
(princ)
)
(defun c:tt ( / _entN _nn _ss)
(setq _ss (ssget "X" (list '(0 . "INSERT"))))
(repeat (setq _nn (sslength _ss))
(setq _entN (ssname _ss (setq _nn (1- _nn))))
(if (assoc 102 (entget _entN))
(setq _ss (ssdel _entN _ss))
)
)
(sssetfirst nil _ss)
(princ)
) 一下子不知道怎么过滤了 这个我也想知道,顶一下 不裁剪的块怎么选择? xyp1964 发表于 2019-3-21 22:35
感谢院长:handshake jh3030912 发表于 2024-7-4 23:17
不裁剪的块怎么选择?
(defun c:tt ()
(if (and (setq ss (ssget "X" (list '(0 . "INSERT"))))
(setq lst (vl-remove-if'(lambda (x) (xyp-DXF 102 x))(xyp-Ss2List ss)))
)
(sssetfirst nil (xyp-list2ss lst))
)
(princ)
) xyp1964 发表于 2024-8-21 20:47
院长,这个需要搭配e派工具箱才可以使用吗?
页:
[1]
2