How to get the ICosmosWorks interface instance?

Answers 3
AA
AA 2016-02-23 Best Answer

swap->GetAddInObject(_T("Solidworks.Simulation.5"),&imObject); will give you simulation interface(ICosworks Object)

AA
AA 2016-02-23

See the c++ code snippet below

swap->GetAddInObject(_T("Solidworks.Simulation.5"),&imObject);

CComPtr pCWAddin = NULL;

CComPtr pCWApp = NULL;

CComPtr pCWDoc = NULL;

(addin->QueryInterface(__uuidof(ICwAddincallback), (void **) &pCWAddin) != S_OK)

break;

pCWAddin->get_CosmosWorks(&pCWApp);

OS
OS 2016-02-24

Thank you