直线删除修改
论坛里边找的程序但是不能满足我的要求求版主 大神们出手修改下程序现在只能删除直线我想让它支持CAD所有的线段 选择对象后不管什么线只要小于我输入的数值 就删除掉(vl-load-com)
(defun C:dell (/ ee i minl ss)
(setq MinL (getdist "\n直线长:"))
(while (setq ss (ssget ":s" '((0 . "LINE")))
i 0
)
(while (setq ee (ssname ss i))
(cond
((> (vlax-get-property (vlax-ename->vla-object ee) 'Length) MinL))
(T
(entdel ee)
)
)
(setq i (1+ i))
)
)
(princ)
) 看看(vl-load-com)
(defun C:tt (/ ee i minl ss dd)
(setq MinL (getdist "\n输入线长:"))
(while (setq ss (ssget ":S")
i 0
)
(while (setq ee (ssname ss i))
(setq dd (vlax-curve-getDistAtParam ee (vlax-curve-getEndParam ee)))
(if (< dd MinL)
(entdel ee)
)
(setq i (1+ i))
)
)
(princ)
) (ssget ":s" '((0 . "LINE,LWPOLYLINE""))) 试试 其他对象能获取长度的应该都可以自行添加 aihuyujian 发表于 2014-12-17 15:28 static/image/common/back.gif
(ssget ":s" '((0 . "LINE,LWPOLYLINE""))) 试试 其他对象能获取长度的应该都可以自行添加
大哥 要删除圆弧的线 该怎么加 kwok 发表于 2014-12-17 15:08 static/image/common/back.gif
看看
谢谢正是我需要的哈哈感谢大神出手 学习到了。
页:
[1]