Mate Constraint solution type

Mate Constraint solution type

anita_zhangBRAD8
Contributor Contributor
296 Views
2 Replies
Message 1 of 3

Mate Constraint solution type

anita_zhangBRAD8
Contributor
Contributor

Hi, experts. Is there any way I can make the solution type of mate constraint "aligned" instead of default to "undirected"?

According to the official documentation here: Inventor 2024 Help | MateConstraint Object | Autodesk, the solution type is read-only and there are no other properties/methods that allow me to change the solution type. 

 

Here are my code to construct the the mate constraint:

	Dim mateCons As MateConstraint 
	mateCons = asmDef.Constraints.AddMateConstraint(targetTemplateEdge, targetDuplicateEdge, 0)
	mateCons.Visible = True
	MsgBox(mateCons.SolutionType)

Thank you for the help!

 

0 Likes
Accepted solutions (1)
297 Views
2 Replies
Replies (2)
Message 2 of 3

Curtis_Waguespack
Consultant
Consultant
Accepted solution

@anita_zhangBRAD8 , I think the syntax would be something like this ( untested): 

mateCons = asmdef.Constraints.AddMateConstraint2(targetTemplateEdge, targetDuplicateEdge ,0,InferredTypeEnum.kInferredLine,InferredTypeEnum.kInferredLine, MateConstraintSolutionTypeEnum.kUndirectedSolutionType)

 

Hope that helps,

Curtis

EESignature

Message 3 of 3

anita_zhangBRAD8
Contributor
Contributor
That works! Thank you for the help!