Sekar Posted June 18, 2024 Posted June 18, 2024 Hi , I have a 3d drawing like this. How to dimension automatically using vba for each table. Thanks test.dwg Quote
BIGAL Posted June 18, 2024 Posted June 18, 2024 (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, 2024 by BIGAL Quote
Sekar Posted June 19, 2024 Author Posted June 19, 2024 Hi bigal, Thanks for the support. Will check out. Cheers 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.