Message 1 of 2
Find Matching Surface
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
I'm taking a system com object "Entity" from the assembly level. I'm then opening up the part document and within the part document. I'm trying to find the corresponding surface for "Entity". Currently I'm evaluating the surface areas. The issue is there are multiple surfaces with the same area. And its mixing them up. Is there a better way to find the matching surface for "Entity"?
"face.Evaluator.Area = Entity.Evaluator.Area"
Sub NameEntity(Entity As Face, Name As String) Dim doc As PartDocument = ThisApplication.ActiveDocument Dim FaceEval = doc.ComponentDefinition.SurfaceBodies. Cast(Of SurfaceBody). SelectMany(Of Face)(Function(f) f.Faces.Cast(Of Face)). Aggregate(Function(face, nextFace) If(face.Evaluator.Area = Entity.Evaluator.Area, face, nextFace))