- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Can anybody help?
I have asked this question before but I do not know how to solve it.
I have the following VBA macro....
Public Sub TraverseAssembly()
Dim oAsmDoc As AssemblyDocument
Set oAsmDoc = ThisApplication.ActiveDocument
msgbox(oAsmDoc.DisplayName)
Call TraverseAssembly(oAsmDoc.ComponentDefinition.Occurrences, 1)
End Sub
Private Sub TraverseAssembly(Occurrences As ComponentOccurrences, Level As Integer)
Dim oOcc As ComponentOccurrence
For Each oOcc In Occurrences
Msgbox(oOcc.Name)
If oOcc.DefinitionDocumentType = kAssemblyDocumentObject Then Call TraverseAssembly(oOcc.SubOccurrences, Level + 1)
Next
End Sub
Is it possible to get the "DESCRIPTION", "MATERIAL" & "CUSTOM PROPERTIES" using oOcc?
For Example,
Msgbox(oOcc.Description)
Msgbox(oOcc.Material)
Msgbox(oOcc. iProperties File Sub-Type)
Etc.
Many thanks in advance!
Darren
Solved! Go to Solution.