Inventor select face to add constraint

Inventor select face to add constraint

FINET_Laurent
Advisor Advisor
551 Views
1 Reply
Message 1 of 2

Inventor select face to add constraint

FINET_Laurent
Advisor
Advisor

Hi everyone,

 

I was hoping this whould be an easy task but here is the issue :

 

From an assembly, I want to add a constraint using the pick command like so :

 

Dim oFace As Face = ThisApplication.CommandManager.Pick(kPartFaceFilter, "hey")
Constraints.AddMate("Mate1","Door plate 2:2","Face1",Nothing,oFace)

 

Turns out it doesn't work, and I can't seem to find the way from oFace to the actual part face..

I have found a work around, but I'm still wondering :

Is it even possible ?

 

Regards,

 

FINET L.

If this post solved your question, please kindly mark it as "Solution"

If this post helped out in any way to solve your question, please drop a "Like"

@LinkedIn     @JohnCockerill

0 Likes
Accepted solutions (1)
552 Views
1 Reply
Reply (1)
Message 2 of 2

FINET_Laurent
Advisor
Advisor
Accepted solution

Never mind, found the solution using this command instead :

 

Dim oFace1 As Face = ThisApplication.CommandManager.Pick(kPartFaceFilter, "Pick Face 1")
Dim oFace2 As Face = ThisApplication.CommandManager.Pick(kPartFaceFilter, "Pick Face 2")
Dim oMateConst As MateConstraint = oAssCompDef.Constraints.AddMateConstraint(oFace1,oFace2,0)

 Still interester in your opinion,

 

Regards,
FINET L.

If this post solved your question, please kindly mark it as "Solution"

If this post helped out in any way to solve your question, please drop a "Like"

@LinkedIn     @JohnCockerill

0 Likes