Sekar Posted June 18 Share Posted June 18 Hi , I have a 3d drawing like this. How to dimension automatically using vba for each table. Thanks test.dwg Quote Link to comment Share on other sites More sharing options...
BIGAL Posted June 18 Share Posted June 18 (edited) Maybe useful is to get a bounding box of the 3d block or solid. (setq obj (vlax-ename->vla-object (car (entsel "pick object ")))) (vla-GetBoundingBox obj 'minpoint 'maxpoint) (setq pointmin (vlax-safearray->list minpoint)) (setq pointmax (vlax-safearray->list maxpoint)) ;minpoint contains the minimum point of the bounding box ;maxpoint contains the maximum point of the bounding box You can work backwards with this to get X, Y & Z. (setq x (abs (- (car pointmax)(car pointmin)))) (setq y (abs (- (cadr pointmax)(cadr pointmin)))) (setq z (abs (- (caddr pointmax)(caddr pointmin)))) This will give box dimensions. Edited June 18 by BIGAL Quote Link to comment Share on other sites More sharing options...
Sekar Posted June 19 Author Share Posted June 19 Hi bigal, Thanks for the support. Will check out. Cheers Quote Link to comment Share on other sites More sharing options...
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.