Use iLogic to add faces containing a certain color to a list

Use iLogic to add faces containing a certain color to a list

Anonymous
Not applicable
337 Views
0 Replies
Message 1 of 1

Use iLogic to add faces containing a certain color to a list

Anonymous
Not applicable

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

 

 

0 Likes
338 Views
0 Replies
Replies (0)