It seems a limitation of import diagnostic that once a faulty STEP (or other intermediate file) is imported into Solidworks and a solid feature or surface features is added at the bottom of its tree the import diagnostic is no more available to be run from the RMB menu.
So I tried to manually roll back just after the initially imported bodies and used a macro to launch import diagnostics anyway on the imported solids. Boom: the file was fixed. I confirmed it comparing before and after data and deleting the feature added after the import solids from the 3d conversion.
Dim instance As IPartDoc
Dim value As System.Integer
value = instance.ImportDiagnosis(False, False, True)
Parameters
CloseAllGaps : True to repair any gaps, false to not
RemoveFaces : True to remove any bad faces and create gaps in the feature, false to not
FixFaces: True to fix the bad faces, false to notOptions
Not usedReturn Value
= 0 if import diagnosis is successful, -1 if an error occurred
Notes:
we use only fix faces set to true. we are using some floating surface for our internal workflow and if we try to use other flags the diagnostic is going to try to sew them to the solidw body failing the feature.
Unless the diagnostic fails (never been able to make it fail) it renturned 1 everytime even with flags set to false.
I do not think is possible to use ImportDiagnosis to log problematic data. i.e. read only to “scan” the file and output the diagnostic results.
From KB
Question
What is the difference between Entity Check and Import Diagnostics?Answer
Entity check is used to check an entity’s conformity with the currently constructed model shape, and detects errors in the entity overall.
Import Diagnostics performs a geometry check on imported bodies using an entity check, and also detects topology (boundary) errors by checking for surface superposition etc.Keywords S-069094,1-3SSZGSW