By Adam Nagy
I have written a blog post on this topic and provided VBA code. If you want to convert it to iLogic then first of all you need to have a basic understanding of iLogic. Going through the help could be a good start.
Then, one by one, try to resolve the error messages given by the iLogic editor.
Here is the iLogic version of the VBA code:
Sub Main() Dim doc As AssemblyDocument doc = ThisApplication.ActiveDocument Dim acd As AssemblyComponentDefinition acd = doc.ComponentDefinition Call DeleteSuppressedComponent(acd.Occurrences) End Sub Sub DeleteSuppressedComponent(occs As ComponentOccurrences) Dim occ As ComponentOccurrence For Each occ In occs If occ.Suppressed Then occ.Delete Else Call DeleteSuppressedComponent(occ.SubOccurrences) End If Next End Sub