Hi @SharkDesign
Here are some ilogic examples that might help.
I hope this helps.
Best of luck to you in all of your Inventor pursuits,
Curtis
http://inventortrenches.blogspot.com
Does report weld beads
Dim oAsmCompDef As AssemblyComponentDefinition
oAsmCompDef = ThisApplication.ActiveDocument.ComponentDefinition
'Iterate through all of the occurrences
Dim oOcc As ComponentOccurrence
For Each oOcc In oAsmCompDef.Occurrences.AllLeafOccurrences
MessageBox.Show(oOcc.Name, "iLogic")
Next
Does NOT report weld beads
Dim oAsmCompDef As AssemblyComponentDefinition
oAsmCompDef = ThisApplication.ActiveDocument.ComponentDefinition
'Iterate through all of the occurrences
Dim oOcc As ComponentOccurrence
For Each oOcc In oAsmCompDef.Occurrences.AllLeafOccurrences
If oOcc.Name.Contains("_Weldbead") = False Then
MessageBox.Show(oOcc.Name, "iLogic")
End If
Next
Does report weld beads
Dim oAsmCompDef As AssemblyComponentDefinition
oAsmCompDef = ThisApplication.ActiveDocument.ComponentDefinition
'Iterate through all of the occurrences
Dim oOcc As ComponentOccurrence
For Each oOcc In oAsmCompDef.Occurrences
MessageBox.Show(oOcc.Name, "iLogic")
Next
Does NOT report weld beads
Dim oAsmCompDef As AssemblyComponentDefinition
oAsmCompDef = ThisApplication.ActiveDocument.ComponentDefinition
'Iterate through all of the occurrences
Dim oOcc As ComponentOccurrence
For Each oOcc In oAsmCompDef.Occurrences
If oOcc.Name.Contains("_Weldbead") = False Then
MessageBox.Show(oOcc.Name, "iLogic")
End If
Next
Does NOT report weld beads
Dim oAsmCompDef As AssemblyComponentDefinition
oAsmCompDef = ThisApplication.ActiveDocument.ComponentDefinition
'Iterate through all of the occurrences
Dim oOcc As ComponentOccurrence
For Each oOcc In oAsmCompDef.Occurrences.AllReferencedOccurrences(oAsmCompDef)
MessageBox.Show(oOcc.Name, "iLogic")
Next