ds-blue-logo
Preview  |  SOLIDWORKS USER FORUM
Use your SOLIDWORKS ID or 3DEXPERIENCE ID to log in.
IIIgor Ilyinskiy10/12/2019

Good afternoon, I need to import the assembly parasolid file (* .xmt_txt) into the assembly for which I use OpenDoc6 ()

But in the end I get the error swFileRequiresRepairError

here is my code:

ISldWorksPtr pApp = Object();
if (!pApp)
   return;
IModelDoc2Ptr modeldoc;
long lErrors = 0, lWarnings = 0;
pApp->OpenDoc6(CComBSTR(path_to_file.c_str()), 2, swOpenDocOptions_Silent, L"", &lErrors, &lWarnings, &modeldoc);

However, if I open the file manually, it is imported without errors...