Ilogic Add Constraint (Mate)

gcoombridge
Advisor

Ilogic Add Constraint (Mate)

gcoombridge
Advisor
Advisor

Hi All,

 

I am working on a illogic assembly and where I've traditionally used isactive to suppress sub-assemblies, I am using the new add component and add constraint tools in 2019. My question is how to constrain sub-assemblies using work planes inside their parts. The snippet below requires the geometry to be in the top level part rather than a component in a sub-assembly as far as I can tell...

 

Is there an adjustment to the syntax required or is this not possible using this snippet?

 

Constraints.AddMate("Mate1", "Part1:1", "Work Plane1", "Part2:1", "Work Plane1",
offset := 0.0, e1InferredType := InferredTypeEnum.kNoInference, e2InferredType := InferredTypeEnum.kNoInference,
solutionType := MateConstraintSolutionTypeEnum.kNoSolutionType,
biasPoint1 := Nothing, biasPoint2 := Nothing)

 

Thanks for your help!

 

Glenn

Use iLogic Copy? Please consider voting for this long overdue idea (not mine):https://forums.autodesk.com/t5/inventor-ideas/string-replace-for-ilogic-design-copy/idi-p/3821399
Reply
Accepted solutions (1)
2,290 Views
5 Replies
Replies (5)

JaneFan
Autodesk
Autodesk
Accepted solution

Hey @gcoombridge , 

 

Please use sentence like this: 

Constraints.AddMate("Mate:1", {"Assy1:1", "Part1:1"},
                    "YZ Plane", {"Assy2:1", "Part1:1"},
                    "Work Plane3")

 




Jane Fan
Inventor QA Engineer

gcoombridge
Advisor
Advisor

Thanks Jane!

Use iLogic Copy? Please consider voting for this long overdue idea (not mine):https://forums.autodesk.com/t5/inventor-ideas/string-replace-for-ilogic-design-copy/idi-p/3821399
0 Likes

donaldleigh
Advocate
Advocate

How do you reference the planes from the main assembly when adding constraints?

 

Normally you reference the part then the plane

0 Likes

JhoelForshav
Mentor
Mentor

@donaldleigh 

To reference planes in the top level assembly, put an empty string ("") in as the component argument. Example:

Constraints.AddMate("Mate:1", "Component1", "YZ Plane", "", "YZ Plane",
                    0 mm)

If you're uncertain how to add a constraint by iLogic, you can create it manually and use capture current state to get the snippet for adding it with iLogic.

Skärmklipp.PNG

Baloo01
Observer
Observer

Just the solution I was looking for

0 Likes