If you would like to use iLogic to delete all suppressed components in an assembly you can use the code below. An example for using this would be if you are trying to export the BOM directly from the assembly environment, suppressed parts are included on export and there is no option to exclude, deleting the suppressed parts would give you the correct BOM for export.
The code below could also be adapted to delete specific components from an assembly. A special thanks to Adam Nagy from the manufacturing dev blog who originally posted this code.
Dim doc As AssemblyDocument
doc = ThisApplication.ActiveDocument
Dim acd As AssemblyComponentDefinition
acd = doc.ComponentDefinition
Sub DeleteSuppressedComponent(occs As ComponentOccurrences)
Dim occ As ComponentOccurrence
For Each occ In occs
If occ.Suppressed Then
If you have any enquiries, please send us a message: