Try this:
-David
[/code]Code:(defun c:combav (/ tm ss i en an ad at av vl) (initget 1) (setq tm (strcase (getstring "\nATTRIB Tag To Add: "))) (and (setq ss (ssget "X" (list (cons 0 "INSERT") (cons 66 1) (cons 67 (if (= (getvar "TILEMODE") 1) 0 1))))) (setq i (sslength ss)) (while (not (minusp (setq i (1- i)))) (setq en (ssname ss i) an (entnext en)) (while (= "ATTRIB" (cdr (assoc 0 (entget an)))) (setq ad (entget an) at (strcase (cdr (assoc 2 ad))) av (cdr (assoc 1 ad))) (if (= at tm) (setq vl (cons (atof av) vl))) (setq an (entnext an))))) (apply '+ vl))



Reply With Quote

Bookmarks