Message 1 of 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
In the screenshot below there are two holes, one is "closed" (a full circle, not on the edge) and the other is "open" (semi-circle on the edge). Using the code below, I am trying to highlight circular faces red, but I don't want the "open" half circle hole to be highlighted. See attached part file to help testing.
How can I differentiate between the two circular faces and figure out which one is "open" or "closed"?
Sub Main()
Dim part As PartDocument
part = ThisDoc.Document
Dim style As RenderStyle
style = part.RenderStyles.Item("red")
For Each face In part.ComponentDefinition.SurfaceBodies.Item(1).Faces
If Face.SurfaceType = SurfaceTypeEnum.kCylinderSurface Then
Face.SetRenderStyle(kOverrideRenderStyle, style)
End If
Next Face
End Sub
Solved! Go to Solution.