cad 计算多线段长度并且带计算公式
发布网友
发布时间:2022-04-23 07:25
我来回答
共2个回答
热心网友
时间:2022-06-17 15:38
(defun C:TE ( / &k1 &ob1 i l1 l2 n1 ss)
(if (null vlax-mp-object) (vl-load-com) )
(if (setq SS (ssget '((0 . "CIRCLE,ELLIPSE,LINE,*POLYLINE,SPLINE,ARC"))))
(progn
(setq i 0 n1 "计算公式:" L1 0)
(while (setq &k1 (ssname ss i))
(setq &ob1 (vlax-ename->vla-object &k1) L2 (vlax-curve-getDistAtParam &ob1 (vlax-curve-getEndParam &ob1)))
(setq L1 (+ L1 L2) L2 (rtos L2))
(if (= i 0) (setq n1 (strcat n1 L2)) (setq n1 (strcat n1 "+" L2)) )
(setq i (1+ i))
);while
(setq i (1+ i) i (rtos i) L1 (rtos L1))
(princ (strcat "\n总共选中:" i "根线"))
(princ (strcat "\n总长度是:" L1))
(princ (strcat "\n" n1))
)
)
(princ)
);已经修改,符合你的要求。
热心网友
时间:2022-06-17 15:39
可以编写的啊,我会编写LSP程序追问嗯!~ 学习狗的我还没有买广联达。
帮我写个? 嘿嘿! 谢谢!
追答你私信我啊