8 Replies Latest reply on Nov 22, 2017 5:46 AM by Sachin Mahajan

    document Manager getting assembly components.

    Cetin Ozgur Baltaci

      Hi,

      I can get components of assembly file after open it in solidworks as below

       

      swApp.OpenDoc6(@"C:\........\........\.....", (int)swDocumentTypes_e.swDocASSEMBLY, (int)swOpenDocOptions_e.swOpenDocOptions_Silent, "", ref errors, ref warnings);

      swDoc = (ModelDoc2)swApp.ActiveDoc;

      swAssembly = (AssemblyDoc)swDoc;

      object[] Components = null;

      Components = (object[])swAssembly.GetComponents(false);

       

      foreach (Object SingleComponent in Components)

                  {

                      swComp = (Component2)SingleComponent;

                     string wholePath=swComp.GetPathName());

                  }

       

      However I want to know about are there any way to get whole these components without opening solidworks by using document manager api and it's key?

      If not i will continue old way...

       

      Best regards.