cad怎么算各线段长度总和
2个回答
展开全部
(defun c:ZC ()
(setvar "cmdecho" 0)
(prompt"统计总长")(terpri)
(setq en (ssget '((0 . "ARC,ELLIPSE,CIRCLE,*LINE"))))
(setq i 0)
(setq ll 0)
(repeat (sslength en)
(setq ss (ssname en i))
(setq endata (entget ss))
(command "lengthen" ss "")
(setq dd (getvar "perimeter"))
(setq ll (+ dd ll))
(setq i (1+ i))
)
(princ "\n 所选线条总长为:")(princ ll)
(setq p1 (getpoint "\n 文字标注点:"))
(command "layer" "m" "6文字层" "c" 3 "6文字层" "l" "continuous" "6文字层" "");6文字层
(command "text" "m" p1 60 0 "总长mm")
(command "text" "m" (polar p1 (* 1.5 pi) 65) 60 0 (rtos LL 2 2))
(princ)
)
(setvar "cmdecho" 0)
(prompt"统计总长")(terpri)
(setq en (ssget '((0 . "ARC,ELLIPSE,CIRCLE,*LINE"))))
(setq i 0)
(setq ll 0)
(repeat (sslength en)
(setq ss (ssname en i))
(setq endata (entget ss))
(command "lengthen" ss "")
(setq dd (getvar "perimeter"))
(setq ll (+ dd ll))
(setq i (1+ i))
)
(princ "\n 所选线条总长为:")(princ ll)
(setq p1 (getpoint "\n 文字标注点:"))
(command "layer" "m" "6文字层" "c" 3 "6文字层" "l" "continuous" "6文字层" "");6文字层
(command "text" "m" p1 60 0 "总长mm")
(command "text" "m" (polar p1 (* 1.5 pi) 65) 60 0 (rtos LL 2 2))
(princ)
)
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询