This allows you to select multiple objects at once and add them all up.
;;----------------------------------------------------------------------;;
;ADD UP TOTAL LENGHTS OF SELECTED OBJECTS.
(defun c:TLEN (/ e ss len i)
(setq len 0.0 ss (ssget '((0 . "LINE,SPLINE,LWPOLYLINE,POLYLINE,ARC,CIRCLE,ELLIPSE"))))
(foreach e (vl-remove-if 'listp (mapcar 'cadr (ssnamex ss)))
(setq len (+ len (vlax-curve-getDistAtParam e (vlax-curve-getEndParam e))))
)
(princ (strcat "\nTotal length = " (rtos len 2 3)))
(vlax-invoke (vlax-get (vlax-get (vlax-create-object "htmlfile") 'ParentWindow) 'ClipBoardData) 'setData "TEXT" (rtos len 2 3))
;above copys to clipboard
(princ)
)
Added the last line so it also copies it to the clipboard so when you edit your block all you have to do is Ctrl+V to paste the value.
Total length = 231.311
Ctlr+V will past "231.311"