Macro: Batch Add Bounding Box

Library for macros
User avatar
gupta9665
Posts: 359
Joined: Thu Mar 11, 2021 10:20 am
Answers: 20
Location: India
x 383
x 414

Macro: Batch Add Bounding Box

Unread post by gupta9665 »

Here is another quick SOLIDWORKS macro to add "Bounding Box" feature found under "Reference Geometry" to all the model files (parts and assemblies) in the selected folder. There is option to hide the bounding box as well.
Batch Add Bounding Box.png
Here is the link to macro: https://www.dropbox.com/s/jfgsghovqqsqs ... x.zip?dl=0


Feel free to reach out via direct message to discuss your design automation requirements. Let's connect, collaborate, and create success together!

Feedback is welcome :)

Macro libraries are set to SW2022 version. In case you're running a different version then update/correct the macro references as suggested in this video:
Deepak Gupta
SOLIDWORKS Consultant/Blogger
User avatar
SPerman
Posts: 1834
Joined: Wed Mar 17, 2021 4:24 pm
Answers: 13
x 2014
x 1688
Contact:

Re: Macro: Batch Add Bounding Box

Unread post by SPerman »

I apologize in advance for the thread drift.

What is the purpose of a bounding box. I've never needed one in the CAD work I do. (Or maybe I did and didn't know it.)
-
I may not have gone where I intended to go, but I think I have ended up where I needed to be. -Douglas Adams
User avatar
jcapriotti
Posts: 1792
Joined: Wed Mar 10, 2021 6:39 pm
Answers: 29
Location: The south
x 1132
x 1940

Re: Macro: Batch Add Bounding Box

Unread post by jcapriotti »

SPerman wrote: Mon May 22, 2023 3:27 pm I apologize in advance for the thread drift.

What is the purpose of a bounding box. I've never needed one in the CAD work I do. (Or maybe I did and didn't know it.)
We are looking to do this for our SolidWorks to get the boundaries to transfer into Windchill and into our ERP. Then downstream manufacturing and packaging groups can use the data for decision making based on the size of the part.

It automatically adds custom properties and calculates them.
image.png
Jason
User avatar
gupta9665
Posts: 359
Joined: Thu Mar 11, 2021 10:20 am
Answers: 20
Location: India
x 383
x 414

Re: Macro: Batch Add Bounding Box

Unread post by gupta9665 »

SPerman wrote: Mon May 22, 2023 3:27 pm I apologize in advance for the thread drift.

What is the purpose of a bounding box. I've never needed one in the CAD work I do. (Or maybe I did and didn't know it.)
As @jcapriotti mentioned, bounding box is to give you overall dimensions of a body, part or assembly. And add those values to properties. This helps the people manufacturing them to get idea of the stock size they would need, specially for weird shaped profiles.
Deepak Gupta
SOLIDWORKS Consultant/Blogger
Post Reply