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.
Code: Select all
Dim instance As IPartDoc
Dim value As System.Integer
value = instance.ImportDiagnosis(False, False, True)
Notes: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 not
Options
Not used
Return Value
>= 0 if import diagnosis is successful, -1 if an error occurred
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