Message 1 of 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello everyone,
I'm having a problem with an API I'm wirting. I'm iterating through an assembly to get iProperties and fulldocumentname of each occurence. In fact, the routine goes well exept when I'm adding a weldment subassembly (normal subassembly do no wrong). Here is the base code i'm using to do that :
Private Sub TraverseAssembly(Occurrences As ComponentOccurrences, Level As Integer) ' Iterate through all of the occurrence in this collection. This ' represents the occurrences at the top level of an assembly. Dim oOcc As ComponentOccurrence For Each oOcc In Occurrences Dim oOccPath As String = oOcc.ReferencedDocumentDescriptor.FullDocumentName 'Check to see if this occurrence represents a subassembly 'and recursively call this function to traverse through it. If oOcc.DefinitionDocumentType = kAssemblyDocumentObject Then Call TraverseAssembly(oOcc.SubOccurrences, Level + 1) End If Next End Sub
With this code, I get the weldment path but not the one of the parts in it. The program gives me an error because oOcc.ReferencedDocumentDescriptor.FullDocumentName is nothing which I don't understand.
I hope someone can help me. I am at a loss there.
Thanks,
Solved! Go to Solution.