Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
Anonymous
in reply to: JamieVJohnson2

Hi Jamie, thanks for your input.

I think I discovered the problem. I'm looping through AllLeafOccurrences, which should only include parts, but I've discovered it also includes weldment assemblies.

2019-01-04_13h37_24.png

 

 

I was trying to access the BOMStructure through the component definition on an object of type ComponentOccurrenceProxy. When my loop encountered any weldment, it produced the error previously mentioned.

 

But if I access it via the occurrence itself (ComponentOccurrence.BOMStructure) it works fine, no error.

 

I dislike looping through occurrences, I much prefer looping through AllReferencedDocuments, but I need to query the suppression state of each document and I'm unaware of anyway to achieve this other than though the occurrence object (ComponentOccurrence.Suppressed).

 

Any idea if its possible to do via the referenced document?