Got it...
ListOfDrawingParts gives me a list of the unique parts with the 32digit part number.
CenterPlateDrawingList gives me the number of unique parts of the type CenterPlate.
You can see in the image that while there are two divverent center plates, there is a common BottomPan.
Thanks for looking
Parameter Rule ListOfDrawingParts As List
ListOfDrawingParts = {}
Dim tempDoc As Any
Dim tempPN As String
For x=1 To length(root.children)
tempDoc = nth(x,root.children)
tempPN = iv_PropertyGet(tempDoc,"Part Number")
If find(tempPN, ListOfDrawingParts, key := :second) = NoValue Then
ListOfDrawingParts = ListOfDrawingParts + {{nth(x,root.children),tempPN}}
End If
If nth(x,root.children).iskindof?(:IvMateConstraint) Or _
nth(x,root.children).iskindof?(:IvInsertConstraint) Or _
nth(x,root.children).iskindof?(:IvWorkPlane) Then
ElseIf nth(x,root.children).iskindof?(:CoilAssembly) Then
For y=1 To length(nth(x,root.children).children)
If nth(y,nth(x,root.children).children).iskindof?(:IvMateConstraint) Or _
nth(y,nth(x,root.children).children).iskindof?(:IvInsertConstraint) Or _
nth(y,nth(x,root.children).children).iskindof?(:IvWorkPlane) Then
ElseIf nth(y,nth(x,root.children).children).iskindof?(:IvAssemblyDocument) Then
tempDoc = nth(y,nth(x,root.children).children)
tempPN = iv_PropertyGet(tempDoc,"Part Number")
If find(tempPN, ListOfDrawingParts, key := :second) = NoValue Then
ListOfDrawingParts = ListOfDrawingParts + {{nth(y,nth(x,root.children).children),tempPN}}
For z=1 To length(nth(y,nth(x,root.children).children).children)
If nth(z,nth(y,nth(x,root.children).children).children).iskindof?(:IvMateConstraint) Or _
nth(z,nth(y,nth(x,root.children).children).children).iskindof?(:IvInsertConstraint) Or _
nth(z,nth(y,nth(x,root.children).children).children).iskindof?(:IvWorkPlane) Then
Else
tempDoc = nth(z,nth(y,nth(x,root.children).children).children)
tempPN = iv_PropertyGet(tempDoc,"Part Number")
If find(tempPN, ListOfDrawingParts, key := :second) = NoValue Then
ListOfDrawingParts = ListOfDrawingParts + {{nth(z,nth(y,nth(x,root.children).children).children),tempPN}}
End If
End If
Next
End If
Else
tempDoc = nth(y,nth(x,root.children).children)
tempPN = iv_PropertyGet(tempDoc,"Part Number")
If find(tempPN, ListOfDrawingParts, key := :second) = NoValue Then
ListOfDrawingParts = ListOfDrawingParts + {{nth(y,nth(x,root.children).children),tempPN}}
End If
End If
Next
End If
Next
ListOfDrawingParts = sort(ListOfDrawingParts,:Ascending, key := :second)
End Rule
Parameter Rule CenterPlateDrawingList As List
CenterPlateDrawingList = {}
For x=1 To length(ListOfDrawingParts)
If subString(second(nth(x,ListOfDrawingParts)),1,11) = "CenterPlate" Then
CenterPlateDrawingList = CenterPlateDrawingList + {nth(x,ListOfDrawingParts)}
End If
Next
End Rule 