- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
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.
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?