I'm trying to do this, thinking it can be done through the documents collection, but the values are changing, however the pages do not. I.e. after I test it a few times, I see that the textstring I want to put is actually there inside the object, however the page does not reflect it.
I have tried using all sorts of update this, update that. anyways.. if someone could point a finger, my brain will thank you.
(defun updateAttsAll (/ block en el date person doc blocks titleObject item)
(vl-load-com)
(setq date (getstring "\nDate: ")
person (getstring "\nApproved by: "))
(vlax-for doc (vla-get-documents (vlax-get-acad-object))
(changeStuff date person doc)
)
)
(defun changestuff (date person doc)
(vlax-for block (vla-get-blocks doc)
(cond
((and
(vlax-property-available-p block "name")
(= (vla-get-name block) "TITLEBLOCK"))(vlax-for item block
(if
(and
(= (vla-get-objectname item) "AcDbAttributedefinition")
(= (vla-get-tagstring item) "APPD"))
(progn
(vla-put-textstring item person)
(vla-update item)
(vla-update block)
)
)
)
)
)
)
)