I am using the following code to mate 2 holes using the axis of each hole as the mating point. The holes mate properly, but the 2 parts that contain the holes don't "click" together like they do when a mate is created through the Inventor constraint dialog box. Is there more parameters that I need to specify to get the parts to come together flush or am I creating the mates wrong?
tia,
Jeff
Code:
' need two entities for the mate
Dim oBrepEnt1 As Object
Dim oBrepEnt2 As Object
'SurfaceType is kCylinderSurface
'Type is kFaceProxyObject
Set oBrepEnt1 = HoleLocations(x - 1).oPost.SurfaceBodies(1).Faces(1)
'SurfaceType is kCylinderSurface
'Type is kFaceProxyObject
Set oBrepEnt2 = oOcc.SurfaceBodies(1).Faces(1)
' Create the mate constraint between the parts.
Dim oMate As MateConstraint
Set oMate = oAsmCompDef.Constraints.AddMateConstraint(oBrepEnt1, oBrepEnt2, 0, kInferredLine, kInferredLine)