Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Create a reactor lisp?

Status
Not open for further replies.

vbcad

Technical User
Jul 12, 2002
159
US
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)
  )
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top