ziele_o2k Posted January 30, 2018 Posted January 30, 2018 I'm inserting new table using this routine: (defun cd:ACX_AddTable (Space Pb Rows Cols RowH ColH) (vla-AddTable Space (vlax-3d-point (trans Pb 1 0)) Rows Cols RowH ColH ) ) Example : (cd:ACX_AddTable (cd:ACX_ASpace) (getpoint) 5 5 10 30) but I'm don't know how to rotate inserted table to current UCS. I'm guessing that this have something in common with direction property but I'm stuck here... Any help ? Subroutines: (defun cd:ACX_ASpace () (if (= (getvar "CVPORT") 1) (vla-item (cd:ACX_Blocks) "*Paper_Space") (cd:ACX_Model) ) ) (defun cd:ACX_Blocks () (or *cd-Blocks* (setq *cd-Blocks* (vla-get-blocks (cd:ACX_ADoc))) ) *cd-Blocks* ) (defun cd:ACX_Model () (or *cd-ModelSpace* (setq *cd-ModelSpace* (vla-get-ModelSpace (cd:ACX_ADoc))) ) *cd-ModelSpace* ) (defun cd:ACX_ADoc () (or *cd-ActiveDocument* (setq *cd-ActiveDocument* (vla-get-ActiveDocument (vlax-get-acad-object)) ) ) *cd-ActiveDocument* ) Quote
Stefan BMR Posted January 30, 2018 Posted January 30, 2018 Try this (setq table (vla-AddTable Space (vlax-3d-point (trans Pb 1 0)) Rows Cols RowH ColH ) ) (vlax-put table 'direction (trans '(1 0 0) 1 0 T)) Quote
Stefan BMR Posted January 30, 2018 Posted January 30, 2018 (edited) I never had this problem. It seems it appears like this if you just insert the table. vla-update doesn't help, but it comes to normal as soon as you start populating the cells or adjust the rows, columns. Even a vla-move will regenerate it. (setq table (vla-AddTable Space (vlax-3d-point 0.0 0.0 0.0) Rows Cols RowH ColH ) ) (vlax-put table 'direction (trans '(1 0 0) 1 0 T)) (vla-move table (vlax-3d-point 0.0 0.0 0.0) (vlax-3d-point (trans Pb 1 0))) Edited January 30, 2018 by Stefan BMR Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.