Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Rotating a table to current UCS

1 REPLY 1
Reply
Message 1 of 2
Redraiderr2009
651 Views, 1 Reply

Rotating a table to current UCS

Tables do no have a rotation angle. I can find the insert point, but there is no other point to make an angle calculation with. 

 

(setq objTable (vlax-ename->vla-object (car (entsel))))

(vlax-dump-object objTable T)

1 REPLY 1
Message 2 of 2
Rtogores
in reply to: Redraiderr2009

You may use vla-TransformBy with the UCS's transformation matrix.

To get the UCS transformation matrix it mus be a NAMED UCS.

This is a very simple example, it supposes your UCS is named previously:

(defun align-table  (/ table mtrans)
  (setq table (vlax-ename->vla-object
                (car (entsel "\nSelect Table:"))))
  (setq mtrans
         (vla-GetUCSMatrix
           (vla-get-ActiveUCS
             (vla-get-activedocument (vlax-get-acad-object)))))
  (vla-TransformBy table mtrans))

 Regards,

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost