ilogic to separate content center parts from modeled parts
Not applicable
06-29-2015
09:52 AM
I am creating a rule that takes part information (raw material part number and quantity from custom parameters) from the parts in my assemblies and exports them to a file that can be imported by our ERP system.
My code works but I would like to filter out the content center parts from the modeled parts - our content center parts are usually purchased and do not have a raw material part number.
an example of the code I am using that filters out parts in the assembly (to avoid sub assemblies and virtual parts):
SyntaxEditor Code Snippet
Dim oAsmDoc As AssemblyDocument
oAsmDoc = ThisApplication.ActiveDocument
Dim oOcc As ComponentOccurrence
For Each oOcc In oAsmDoc.ComponentDefinition.Occurrences
If TypeOf oOcc.Definition Is PartComponentDefinition Then
MessageBox.Show(oOcc.Name, "Part Name")
Else
End If
Next
The above code works but does not filter out content center parts. Could someone please point me in the right direction to filter out content center parts from modeled parts?
Thanks!
Link copied