Message 1 of 5
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Using iLogic, can I use AddMate (contraints) to mate from a component to one of the Assembly workplanes?
Dave
Envisage
Solved! Go to Solution.
Using iLogic, can I use AddMate (contraints) to mate from a component to one of the Assembly workplanes?
Dave
Envisage
Solved! Go to Solution.
Yes. To indicate that you want to use a work feature in the assembly itself, specify an empty string for the component name. Example:
Constraints.AddMate("Part1 XY Mate" "Part1:1", "XY Plane", "", "XY Plane")
Hi Mike,
How do you constrain to between parts of sub-assemblies? I want to constrain to subassemblies together using planes in a part that both assemblies have. Basically I just want to go one level deeper than this snippet.
I.e.: "matename", "subassembly:1", "part 1:1", "workplaneA", "subassembly:2", "part 1:1", "workplaneA",
is this possible?
Cheers,
Glenn
Hi Glenn,
Yes, it's possible. You can specify each full path {subassemblyName, ..., partName} to a component as an array of strings. The easiest way is to use brace characters to put the arrays together. Here's a sample:
Dim mate1 = Constraints.AddMate("matename", {"subassembly:1", "part 1:1"}, "workplaneA", {"subassembly:2", "part 1:1"}, "workplaneA")
Note: if you have already created a constraint manually, you can see the code that would be required to re-create it by using the Capture Current State command on the context menu in the rule editor.
Brilliant! Thanks Mike