AnsweredAssumed Answered

document Manager getting assembly components.

Question asked by Cetin Ozgur Baltaci on Nov 15, 2015
Latest reply on Nov 22, 2017 by Sachin Mahajan


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.