I'm trying to use of of Lee Mac's attribute functions but I can't seem to get it to work. Any help is appreciated.
Code:
(defun LM:setattributevalues ( blk lst / enx itm )
(while (= "ATTRIB" (cdr (assoc 0 (setq enx (entget (setq blk (entnext blk)))))))
(if
(and
(setq itm (assoc (cdr (assoc 2 enx)) lst))
(entmod (subst (cons 1 (cdr itm)) (assoc 1 enx) enx))
)
(entupd blk)
)
)
)
(defun c:clr ()
(setq blk (ssget))
(setq lst
'(
("REV:" . "-")
("DESC:" . "x")
("ADDITIONAL_INFO:" . "x")
("REV_DATE:" . "x")
("TA:" . "x")
("OA:" . "x")
("DD:" . "x")
)
)
(LM:SetAttributeValues blk lst)
(princ)
)