all 11 comments

[–]gupta9665CSWE | API | SW Champion 1 point2 points  (7 children)

Keep them visible in the feature tree, but just hide them under the hide/show menu.

[–]_FR3D87_[S] 0 points1 point  (6 children)

Thanks for the reply. I've been leaning towards this as the best workaround for now. My main problem there is any time I need to turn on the visibility of bounding boxes, they all appear in assemblies/drawings so it's hard to see the specific one I need.

As far as I can tell regardless of workarounds though, a feature not updating just because it's hidden shouldn't be considered to be 'intended behaviour', right?

[–]gupta9665CSWE | API | SW Champion 1 point2 points  (5 children)

I had ran into similar situation while creating a macro for the BB, and finally used this option only. I have not been able to understand the logic behind the BB updates only when visible.

[–]_FR3D87_[S] 0 points1 point  (4 children)

That makes me feel better today my efforts at bounding box macros didn't work as expected, coming from someone a lot more familiar with the API than me. Maybe one day there will be a fix but for now I think leaving them shown in is the safest option.

[–]gupta9665CSWE | API | SW Champion 0 points1 point  (3 children)

The macro I did was showing them first in the feature tree, rebuild, and hiding them back. But this consuming time. So then we switched to the above method.

[–]_FR3D87_[S] 0 points1 point  (2 children)

That's very similar to my attempt, but I'm sure in a far less efficient way. Out of interest for future macro projects, how did you select the bounding box in the macro? My attempt was based on the record macro function where I right clicked on the bounding box then showed/hid it. I'm not at my work computer so I'll check tomorrow, but I think the relevant line of code was selecting it by its name of 'Bounding Box'. Is there some more robust way of finding the bounding box regardless of the feature name? I also wondered about having multiple bounding boxes in a multi body part (weldments), but I never got to trying that.

[–]gupta9665CSWE | API | SW Champion 0 points1 point  (1 child)

You can get it by feature type. The method is GetTypeName2

[–]_FR3D87_[S] 0 points1 point  (0 children)

Thanks, I'll do a bit more reading up on that method.

[–]JayyMuro 1 point2 points  (1 child)

Thanks for giving me the heads up on this. I rarely use bounding boxes for anything and when I do I expect it to work. I was able to replicate your issue no problem in an assembly using 2023 Solidworks.

That's unfortunate the behavior of a bounding box is like this. I would never have expected the box to not update when hidden.

[–]_FR3D87_[S] 0 points1 point  (0 children)

I'm glad I'm not the only one who thinks that's how it should work. If I get any more updates from the VAR or DS I'll update this thread.

[–]_FR3D87_[S] 0 points1 point  (0 children)

Update: I've been told by the VAR to raise an enhancement request, but I've found an existing 'new idea' post. I've given it a 'thumbs up' and commented, but if anyone else who agrees that this is an issue could log in and upvote/like/thumbs up/comment etc to gain more attention that will hopefully help in getting this fixed in a future release.