Try this [minimally tested]:
(defun C:MLTL ; = MultiLine Total Length
(/ mlss len n verts)
(if (setq mlss (ssget "_X" '((0 . "MLINE"))))
(progn ; then
(setq len 0)
(repeat (setq n (sslength mlss))
(setq
mldata (entget (ssname mlss (setq n (1- n))))
verts (mapcar 'cdr (vl-remove-if-not '(lambda (x) (= (car x) 11)) mldata))
); setq
(if (= (logand (cdr (assoc 71 mldata)) 2) 2); closed?
(setq verts (append verts (list (car verts)))); add first vertex again at end
); if
(repeat (1- (length verts))
(setq len (+ len (distance (car verts) (cadr verts))))
(setq verts (cdr verts))
); repeat [between-vertext distances]
); repeat [MLINEs]
(prompt (strcat "\nTotal Length of MultiLines: " (rtos len)))
); progn
); if
(princ)
); defun
It accounts for any configuration(s), and open or closed ones. If any are not just single-segment as it appears from later Messages that yours will be, what it measures between are the defining vertex locations [the grips when selected], which under "Zero" justification may not even lie on an element of the MLINE.
It reports the total length in whatever the current settings are for linear-measure units format and precision. That can be forced to be different with some arguments added to the (rtos) function.
Kent Cooper, AIA