I need a function where I can select arc and lines; and get a total length of all the objects seleted. With coco commands I'm not able to select arcs and lines while keeping a running total. Is there a way that I could combine these two lisp routines in order to do just that? This function is to be used with Autocad 2004 Line Lisp: (defun C:LINESUM () (setq sset (ssget '((0 . "LINE")))) (if sset (progn (setq tot 0.0) (setq num (sslength sset) itm 0) (while (< itm num) (setq hnd (ssname sset itm)) (setq ent (entget hnd)) (setq pt1 (cdr (assoc 10 ent))) (setq pt2 (cdr (assoc 11 ent))) (setq dis (distance pt1 pt2)) (setq tot (+ tot dis)) (setq itm (1+ itm)) ) (princ (strcat " Total Distance = " (rtos tot))) ) ) (princ) ) Arc Lisp: (defun c:arcsum () (setq tlen 0.0) (setq sset (ssget '((0 . "ARC")))) (setq num (sslength sset) itm 0) (while (< itm num) (setq hnd (ssname sset itm)) (setq ent (entget hnd)) (setq rads (cdr (assoc 40 ent))) (setq sang (cdr (assoc 50 ent))) (setq eang (cdr (assoc 51 ent))) (if (> eang sang) (setq iang (- eang sang)) (setq iang (+ (- 6.28319 sang) eang)) ) (setq larc (* iang rads)) (setq tlen (+ tlen larc)) (setq itm (1+ itm)) ) (princ (strcat " Total = " (rtos tlen))) (princ) )