RE: updating attribute text
Use the find command, set the options to attribute value and "whole words only" should be checked. then type 10 in the what to find box and 17 in the replace with box, then click replace all (if you only want to apply this to a portion of the drawing there is a button that will let use pick a window/crossing box)
I just saw you are using 2002, I believe this command was still there then, but not sure as we are using 2006.
RE: updating attribute text
Or, you can use this its quick and dirty with no error checking but it works! Cut and paste this into notepad save as ".lsp", and load it up.
Code:
;This routine will replace the string value of attributes in the specified block
;it will only replace values that equal what you specify, no error checking
(defun C:RAS ( / src_blk blk_name old_str new_str ss indx blk att att_alst)
(setq src_blk (entsel "\nSelect the block which contains the attribute: "))
(setq blk_name (cdr (assoc 2 (entget (car src_blk)))))
(initget 1)
(setq old_str (getstring T "\nEnter attribute string to replace: "))
(initget 1)
(setq new_str (getstring T "\nEnter new attribute string: "))
(setq ss (ssget "X" (list '(-4 . "<AND") '(0 . "INSERT") (cons 2 blk_name) '(-4 . "AND>"))))
(setq indx 0)
(while (<= indx (- (sslength ss) 1))
(setq blk (ssname ss indx))
(setq att (entnext blk))
(while (and (/= att nil) (/= (cdr (assoc 0 (entget att))) "SEQEND"))
(setq att_alst (entget att))
(if (= (cdr (assoc 1 att_alst)) old_str)
(progn
(setq att_alst (subst (cons 1 new_str) (assoc 1 att_alst) att_alst))
(entmod att_alst)
(entupd att)
)
)
(setq att (entnext att))
)
(setq indx (1+ indx))
)
(princ)
)
Ty :mrgreen:
RE: updating attribute text
Hi
or....
_.-AttEdit
but, having just re-read your question I note you mention the BattMan command, therefore are you referring to an Attribute "Tag" or "Value"?
BattMan would make sense for "Tag"
EAttEdit / AttEdit / -AttEdit would make sense for "Value"
Have a good one, Mike