Aqui un codigo para sumar Lineas, Polilineas, Arcos, Circulos, Elipses, Spline, 3dpoly

Code:
(defun c:SUMALL(/ fList firSet entSet filOut entList totLen)
(vl-load-com)
(setq fList '((-4 . "<OR")(0 . "*LINE")(0 . "CIRCLE")
(0 . "ARC")(0 . "ELLIPSE")(-4 . "OR>")
(-4 . "<NOT")(0 . "MLINE")(-4 . "NOT>"))
filOut 0
); end setq
(if
(not
(and
(setq firSet(ssget "_I")
entSet(ssget "_I" fList)
); end setq
); end and
); end not
(progn
(princ "\n<<< Seleccione entidades para calcular la longitud Total: >>> ")
(setq entSet(ssget fList))
); end progn
(setq filOut(-(sslength firSet)(sslength entset)))
); end if
(if entSet
(progn
(setq entList(mapcar 'vlax-ename->vla-object
(vl-remove-if 'listp
(mapcar 'cadr(ssnamex entSet))))
totLen(apply '+
(mapcar '(lambda (x)
(vlax-curve-getDistAtParam x
(vlax-curve-getEndParam x)))entList))
); end setq
(if(/= 0 filOut)
(princ(strcat "\n<!> " (itoa filout)
" were filtered out (unsupported type)! <!>"))
); end if
(princ(strcat "\n<<< Total de Entidades: "(itoa(length entList))
", Longitud total: "(rtos totLen) " >>> "))
); end progn
(princ "\n<!> No has seleccionado Nada! <!>")
); end if
(princ)
); end of c:SUMALL