AnsweredAssumed Answered

Assembly - Bounding Box - Disregard Suppressed Items

Question asked by Raymond Yau on May 3, 2018
Latest reply on May 3, 2018 by Raymond Yau

Feels like a long time since I've posted here!

 

I'm looking for advice on amending a macro I found here:

2017 SOLIDWORKS API Help - Get Assembly Bounding Box Using Components Example (VBA)

 

The macro takes the max/min values from the Getbox method and returns corner point locations of all visible components. It works as expected, but when there's suppressed components involved, it doesn't seem to like it.

 

Instead of filtering by visibility, I added a line of code to so that suppressed components should be ignored, but this throws up a "Type Mismatch" error. Anyone have any ideas why this happens?

 

Note: the assembly is just random parts I quickly modelled and mated for the test.

 

R

Outcomes