I would like to create a reactor lisp to run the posted code. What I need to do is to rotate the attributes of all block back to zero when I use the commands "insert","Execute tool", "copy" "rotate" Basically any command that would change the orientation of the attribute. I have know idea on what to do and the help files were not very helpful.
Code:
(defun c:RA( / ss obj)
(vl-load-com)
(if (ssget "X" (list (cons 2 "*")))
(progn
(vlax-for obj (setq ss (vla-get-activeselectionset (vla-get-activedocument (vlax-get-acad-object))))
(if (= (vla-get-HasAttributes obj) :vlax-true)
(foreach attVar (vlax-invoke obj 'GetAttributes)
(if (not (= (vla-get-TagString attVar) "*"))
(vla-put-Rotation attVar 0)))))
(vla-delete ss)))
(princ)
)