Message 1 of 1
Use iLogic to add faces containing a certain color to a list

Not applicable
03-06-2015
05:49 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I've been presented with the idea of somehow accounting for paint in a BOM. Sounded easy enough, but turns out not so much. I have a part in which certain faces are selected and set to a certain color (Yellow). Is there a way, using ilogic, to loop through all the faces to a part body and add them to a list if they are a certain color? After that I intend to loop through that list and tally up the total area in the same rule.
Basically, something like this:
Dim oPartCompDef As PartComponentDefinition
oPartCompDef = ThisApplication.ActiveDocument.ComponentDefinition
Dim oList As New ArrayList
For Each oFace In oPartCompDef.Faces
If oFace.Color = "Yellow" Then
oList.Add(oFace.Name)
End If
Next