# Macro: Batch Add Bounding Box

**URL:** <https://forum.cadmunity.com/t/macro-batch-add-bounding-box/2421>\
**Category:** Macro Library\
**Created:** [May 22, 2023, 7:22pm UTC](https://forum.cadmunity.com/t/macro-batch-add-bounding-box/2421 "2023-05-22T19:22:13Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![gupta9665](https://forum.cadmunity.com/user_avatar/forum.cadmunity.com/gupta9665/32/6304_2.png) [@gupta9665](https://forum.cadmunity.com/u/gupta9665)\
**Post date:** [May 22, 2023, 7:22pm UTC](https://forum.cadmunity.com/t/macro-batch-add-bounding-box/2421/1 "2023-05-22T19:22:13Z")

</div>

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.

~~[attachment=0]~~Batch Add Bounding Box.png[/attachment]

Here is the link to macro: \<LINK\_TEXT text=“[https://www.dropbox.com/s/jfgsghovqqsqs](https://www.dropbox.com/s/jfgsghovqqsqs) … x.zip?dl=0”\>[https://www.dropbox.com/s/jfgsghovqqsqs3m/Batch%20Add%20Bounding%20Box.zip?dl=0](https://www.dropbox.com/s/jfgsghovqqsqs3m/Batch%20Add%20Bounding%20Box.zip?dl=0)\</LINK\_TEXT\>  
  
  
  
  
  
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: [https://www.youtube.com/watch?v=uieXLNVf5dE](https://www.youtube.com/watch?v=uieXLNVf5dE)

---

<div class="post-metadata">

**Author:** ![SPerman](https://forum.cadmunity.com/user_avatar/forum.cadmunity.com/sperman/32/59_2.png) [@SPerman](https://forum.cadmunity.com/u/SPerman)\
**Post date:** [May 22, 2023, 7:27pm UTC](https://forum.cadmunity.com/t/macro-batch-add-bounding-box/2421/2 "2023-05-22T19:27:18Z")

</div>

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.)

---

<div class="post-metadata">

**Author:** ![jcapriotti](https://forum.cadmunity.com/user_avatar/forum.cadmunity.com/jcapriotti/32/24_2.png) [@jcapriotti](https://forum.cadmunity.com/u/jcapriotti)\
**Post date:** [May 22, 2023, 8:38pm UTC](https://forum.cadmunity.com/t/macro-batch-add-bounding-box/2421/3 "2023-05-22T20:38:01Z")

</div>

> [@](#):
>
> 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

---

<div class="post-metadata">

**Author:** ![gupta9665](https://forum.cadmunity.com/user_avatar/forum.cadmunity.com/gupta9665/32/6304_2.png) [@gupta9665](https://forum.cadmunity.com/u/gupta9665)\
**Post date:** [May 23, 2023, 5:22am UTC](https://forum.cadmunity.com/t/macro-batch-add-bounding-box/2421/4 "2023-05-23T05:22:12Z")

</div>

> [@](#):
>
> 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.

---

<div class="post-metadata">

**Author:** ![nevillew](https://forum.cadmunity.com/user_avatar/forum.cadmunity.com/nevillew/32/92_2.png) [@nevillew](https://forum.cadmunity.com/u/nevillew)\
**Post date:** [September 30, 2024, 10:34pm UTC](https://forum.cadmunity.com/t/macro-batch-add-bounding-box/2421/5 "2024-09-30T22:34:33Z")

</div>

I don’t need a macro for adding bounding boxes . . . . I need one for stopping all the updating of bounding boxes on opening an assembly.  
Is this possible or is it baked into program (I’m using SW 2020 and no, I’m not going to update to latest version !!)
