hi
I want to edit 1 attribute value in a block to number all my blocks (eg A001, A002, A003...) (example picture attached)
I know about the attout and attin but I need a lsp routine that only changes one attribute value without having to double click and go through that.
i attached a lsp routine, id be really thankful if someone could edit it for me and remove everything except the value part.
thanks
Solved! Go to Solution.
Solved by hmsilva. Go to Solution.
its isnt very convenient to me because it opens another box.
i wanted something like the lisp i attached (1- click on the attribute that i want to change, 2- enter new attribute value, 3- click enter to choose another attribute to change)
vahe.holtian,
each block has only one attribute or has more than one?
Attaches one of your blocks to change.
Henrique
vahe.holtian,
just pick the text to edit,
and type the new text.
Minimally tested
(defun c:NTag (/ ent obj new) (vl-load-com) (setq ent (car (nentsel "\nSelect Att Tag to Edit:"))) (setq obj (vlax-ename->vla-object ent)) (setq new (getstring "\nType the New Text: ")) (vla-put-textstring obj new) )
Henrique
hey henrique. this is exactly what i wanted, many thanks !
is it possible that you change it so that it doesnt exit after entering the new value? i want it to ask for another attribute to change.
thanks again!
vahe.holtian,
You're welcome.
(defun c:NTag (/ ent obj new) (vl-load-com) (if (setq ent (car (nentsel "\nSelect Att Tag to Edit:"))) (progn (setq obj (vlax-ename->vla-object ent)) (setq new (getstring "\nType the New Text: ")) (vla-put-textstring obj new) (C:NTag) );progn (princ) );if )
Henrique
hey, it only asks twice. i wanted it to keep asking for another attribute until i exit
vahe.holtian,
the code keeps asking until you press enter or not select anything...
Henrique