AnsweredAssumed Answered

SolidWorks API Multi-mates

Question asked by Vadim Vadim on Aug 9, 2016
Latest reply on Aug 10, 2016 by Vadim Vadim

Hello, guys. I have some question about multiple mates. When i have a few of objects, i can press Mates on Command Manager, then press Multiple Mate Mode button, change type to Lock, select some object like main and select other objects to create mate. But how i can do same process by API (for, example C#).
I can get all components from current document, like this:

SolidWorks.Interop.sldworks.ModelDoc2 doc = swAddin.SwApp.IActiveDoc2;
var components = ((doc as SolidWorks.Interop.sldworks.IAssemblyDoc)?.GetComponents(true) as object[]).OfType<SolidWorks.Interop.sldworks.IComponent2>().ToArray();

But what i must to do next, can someone help me ??