Visual LISP, AutoLISP and General Customization
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
Rotating a table to current UCS
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
113 Views, 1 Replies
09-12-2012 11:50 AM
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)
Re: Rotating a table to current UCS
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
09-13-2012 02:34 AM 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,
Reinaldo N. Togores
AutoCAD Expert's Visual LISP
AutoCAD Expert's Visual LISP

