;****************************************************测量长度
(defun c:555()
(setq os (getvar "osmode"))
(setvar "osmode" 0)
(setq sum 0 i 0)
(setq ss (ssget))
(repeat (sslength ss)
(setq en (ssname ss i))
(command "lengthen" en "")
(setq l (getvar "perimeter"))
(setq sum (+ sum l)
i (+ i 1))
)
(setvar "osmode" os)
(princ "\n长度之和 = ")
(princ sum )
)
;****************************************************测量长度
(defun cWW614()
(setq os (getvar "osmode"))
(setvar "osmode" 0)
(setq sum 0 i 0)
(setq ss (ssget))
(repeat (sslength ss)
(setq en (ssname ss i))
(command "lengthen" en "")
(setq l (getvar "perimeter"))
(setq sum (+ sum l)
i (+ i 1))
)
(setvar "osmode" os)
(princ "\n长度之和 = ")
(princ sum )
)
;****************************************************面积求和
(defun c:666 (/ olderr oldcmdecho errexit undox restore ss1 nr en tot_area)
(defun errexit (s)
(restore)
)