AnsweredAssumed Answered

Warning message while importing STEP assembly files using the SW API

Question asked by Samer Ghafour on Apr 16, 2013
Latest reply on May 25, 2013 by Jerry Steiger


I’m trying to import a step assembly file into SW using the API.

The following code is used:



    long lLoadFileError = 0;

    HRESULT hResult = S_OK;

    CComPtr<IDispatch> pdspImportFileData;

    CComPtr<IImportStepData> pImportStepData;


    hResult = iSwApp->GetImportFileData(bstrStandardFileFullPathName, &pdspImportFileData);

    if (pdspImportFileData)


        hResult = pdspImportFileData->QueryInterface(IID_IImportStepData, (void**)&pImportStepData);

        if (pImportStepData)




    // Load the Step File

    CComPtr<IModelDoc2> outModelDoc2;

    hResult = iSwApp->LoadFile4("C:\\temp.stp", _T("r"), pImportStepData,&lLoadFileError, &outModelDoc2 );



This code works well for importing step part files, but for step assembly files it raises a warning message only when swImportFreeCurves is set to true to import wireframe entities (or “Free point/curve entities” tick box in the general file format setting  is enabled).


The following  Warning Message box is displayed in Solidworks when calling the LoadFile() method for any assembly step file :

Documents will be created on disc to import free curves and points.

See the following file for details: (path to .err file), the error log file that contains the following message :

Error: Documents will be created on disc to import free curves and points.

STEP-in did not complete successfully.


Although there is a tick box “Don’t show this message again”, but It has no impact, and the message appears again!

This makes a real issue while processing files in batch mode.

Thanks in advance for your help.