CAD多段线节点上如何快速画点??
(defunC:tes(/#g1&k1&kw1iptss1x)(if(nullvlax-dump-object)(vl-load-com))(princ"\n请选择多段线...
(defun C:tes ( / #g1 &k1 &kw1 i pt ss1 x)
(if (null vlax-dump-object) (vl-load-com) )
(princ "\n请选择多段线")
(if (setq &kw1 (ssget '((0 . "LWPOLYLINE"))))
(progn
(while (setq &k1 (ssname &kw1 0))
(setq &kw1 (ssdel &k1 &kw1) #g1 (entget &k1))
(setq ss1 (mapcar 'cdr (vl-remove-if '(lambda (X) (/= 10 (car x))) #g1)))
(setq i 0)
(repeat (length ss1)
(setq pt (nth i ss1) i (1+ i))
(entmake (list '(0 . "POINT") (cons 10 pt)));绘制点
)
)
)
)
(princ)
);复制到记事本,以【.lsp】为后缀命名,打开CAD,autolisp加载了,命令【TES】
我按这个操作了,可是还是没法用 展开
(if (null vlax-dump-object) (vl-load-com) )
(princ "\n请选择多段线")
(if (setq &kw1 (ssget '((0 . "LWPOLYLINE"))))
(progn
(while (setq &k1 (ssname &kw1 0))
(setq &kw1 (ssdel &k1 &kw1) #g1 (entget &k1))
(setq ss1 (mapcar 'cdr (vl-remove-if '(lambda (X) (/= 10 (car x))) #g1)))
(setq i 0)
(repeat (length ss1)
(setq pt (nth i ss1) i (1+ i))
(entmake (list '(0 . "POINT") (cons 10 pt)));绘制点
)
)
)
)
(princ)
);复制到记事本,以【.lsp】为后缀命名,打开CAD,autolisp加载了,命令【TES】
我按这个操作了,可是还是没法用 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询
广告 您可能关注的内容 |