Message 1 of 5
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi. I want to get a FullFileName from a suppressed occurrences and non-suppressed occurrences in an Assembly. I tried iLogic rule below. The rule works correctly for a part or an assembly.. Issues is when the occurrence is for example a weld or a virtual component or other item that can be suppressed and does not have the FullFileName. How can I check if the item is the part or the assembly?
Sub Main()
Dim oDoc As Document = ThisDoc.Document
If oDoc.DocumentType = kAssemblyDocumentObject Then
Dim oAsmDoc As AssemblyDocument = ThisApplication.ActiveDocument
Dim oOccs As ComponentOccurrences = oAsmDoc.ComponentDefinition.Occurrences
Dim oOcc As ComponentOccurrence
Dim List_Of_Components As New List(Of String)
For Each oOcc In oOccs
If oOcc.Suppressed = True Then
List_Of_Components.Add(oOcc.ReferencedFileDescriptor.FullFileName & "- Suppressed - True")
ElseIf oOcc.Suppressed = False Then
List_Of_Components.Add(oOcc.ReferencedFileDescriptor.FullFileName & "- Suppressed - False")
End If
Next
a = InputListBox("List Of Components:", List_Of_Components)
End If
End Sub
Solved! Go to Solution.