0 Members and 1 Guest are viewing this topic.
(defun c:sametext (/ ent1 ent2 objID) (command "_undo" "BEGIN") (vl-load-com) (setq ent1 (car (entsel "\nSelect original text: "))) ;;convert the entity to an object (setq objID (vla-get-objectid (vlax-ename->vla-object ent1)) str (strcat "%<\\AcObjProp Object(%<\\_ObjId " (rtos objID 2 0) ">%).TextString>%") ) (setq ent2 (vlax-ename->vla-object (car (entsel "\nSelect text to be the same: ")))) (vla-put-textstring ent2 str) (vla-update ent2) (command "_undo" "END") (princ))
Code: [Select](defun c:sametext (/ ent1 ent2 objID) )
(defun c:sametext (/ ent1 ent2 objID) )
Tsec2nd First:You have to SETUP your second text to read the first text VALUE.Crank's program does this.Run his code.THEN :-When you change the value of the first text, REGEN and the second value should change.