This routine will change all attributes with the value of 2005 to 2006.
How can I make it so it will also change any attribute value of 2004, 2003, 2002, etc. to 2006?
Thanks
(defun c:YEAR () ;(/ dastr )
(setvar "cmdecho" 0)
(setq dastr (strcat "2006"))
(setq atts (ssget "x" '((0 . "INSERT") (66 . 1))))
(if atts
(progn
(setq cnt 0)
(repeat (sslength atts)
(setq ename (ssname atts cnt))
(while ename
(setq ename (entnext ename))
(if (/= (cdr (assoc 0 (entget ename))) "ATTRIB")
(setq ename nil)
(progn
(if (= (cdr (assoc 1 (entget ename))) "2005")
(progn
(entmod (subst (cons 1 dastr) (assoc 1 (entget ename)) (entget ename)))
(entupd (ssname atts cnt))
(setq ename nil)
)
);end if
)
);end if
);end while
(setq cnt (1+ cnt))
);end repeat
));end if
)