请问高手:CAD中怎样做只保留图框中内容?
什么意思,说具体一点 我的一张大的地形图要分成多张A3图,怎样做最简单啊?谢谢! 在布局中很容易实现的。 用MAP来裁减! myfreemind 发表于 2004-1-10 17:13用MAP来裁减!
(defun c:11 (/co getco i s s0 s1 ss ss1)
;;多选颜色保留
(defun GetCo (s0 / a co en la)
(setq en (entget s0))
(if(setq a (assoc 62 en))
(cdr a)
(cdr (assoc 62 (tblsearch "layer" (cdr (assoc 8 en)))))
)
)
(if (and (progn (princ "\n多选过滤颜色对象:")
(setq s0 (ssget ))
)
(setq s0 (mapcar 'GetCo (vl-remove-if 'listp (mapcar 'cadr (ssnamex s0)))))
(progn
(princ "\n选择目标对象:")
(setq s (ssget))
)
(setq s (vl-remove-if 'listp (mapcar 'cadr (ssnamex s))))
(setq s (mapcar '(lambda(x)(list x (GetCo x)))s))
(setq s (vl-remove-if-not '(lambda(x)(member (cadr x) s0))s))
(setq s (mapcar 'car s))
(setq ss (ssadd))
(progn (foreach x s (ssadd x ss)) t)
)
(progn
(sssetfirst nil ss)
(princ (strcat "\n已选择" (itoa (sslength ss)) "个对象"))
(command "erase" (ssget "a") "r" ss "")
(princ)
)
)
)
选中图框内容保,没有选中,不修理?
页:
[1]