Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Mating 2 holes

0 REPLIES 0
Reply
Message 1 of 1
clu82
156 Views, 0 Replies

Mating 2 holes

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)
0 REPLIES 0

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report