(defun c:Ut (/ entdata btxt ntxt bltxt)

(command "UNDO" "BEGIN")

(while (not (setq bltxt (nentsel "\nSelect attribute or text to change: ")))
(prompt " Nothing selected, retry!\n")
);_while

(setq entdata (entget (car bltxt))
btxt (cdr (assoc 1 entdata))
ntxt (strcat "%%U" btxt )
);_setq
(entmod (subst (cons 1 ntxt)(assoc 1 entdata) entdata))
(entupd (cdr (assoc -1 entdata)))

(command "UNDO" "END")

);_defun
(c:ut)

Advertisements