I try to use constrain-flush those part. I don`t know how to dim the face in part from assembly file. I appreciate any help!
Solved! Go to Solution.
Solved by JelteDeJong. Go to Solution.
Maybe this can help you. This code takes the first face of the 1e and 2e occurrence and use them for a flush constraint. I think you can test this the best with an assembly that contains 2 cubes.
Dim doc As AssemblyDocument = ThisDoc.Document Dim occ1 As ComponentOccurrence = doc.ComponentDefinition.Occurrences.Item(1) Dim occ2 As ComponentOccurrence = doc.ComponentDefinition.Occurrences.Item(2) Dim face1 As Face = occ1.SurfaceBodies.Item(1).Faces.Item(1) Dim face2 As Face = occ2.SurfaceBodies.Item(1).Faces.Item(1) Dim faceProxy1 As FaceProxy Dim faceProxy2 As FaceProxy occ1.CreateGeometryProxy(face1, faceProxy1) occ2.CreateGeometryProxy(face2, faceProxy2) doc.ComponentDefinition.Constraints.AddFlushConstraint(faceProxy1, faceProxy2, 0)
Jelte de Jong
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
Blog: hjalte.nl - github.com
Can't find what you're looking for? Ask the community or share your knowledge.