4 Replies Latest reply on Aug 10, 2016 9:32 AM by Vadim Vadim

    SolidWorks API Multi-mates

    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 ??