SUModelFixErrors no longer work since SketchUp 2020 SDK!

The SUModelFixErrors function, which worked well before SketchUp 2020, it no longer work when I update to the 2020 version! Is there any change to this function in the 2020 SDK?

Can you elaborate a bit more on what “doesn’t work”? Are you getting error codes back? Unexpected results?

Do you have a sample model and sample code please?

This is a sample model that my program created, it has some uv problems
sample.skp (2.7 MB)

1.When open it with SketchUp it popup the fix error dialog;
2.Call SUModelFixErrors before saving, SDK2019, no dialog came up(That’s what I want);
3.Call SUModelFixErrors before saving, SDK2020, the fix error dialog show up again;
I don’t known where the problem is!

Can you elaborate how you use the function?

Do you open the file, invoke SUModelFixErrors and then save it?

Have you tried the latest SU2021.1 SDK?

I use the function like this:


// … Build the geometries

SUModelSaveToFileWithVersion(mModel, fileName.c_str(), (SUModelVersion)SuOption::get()->getVersion());

And all the functions return SU_ERROR_NONE.

I tried SDK2021, the result is the same as SDK2020, and the versions below SDK2019 work well.

What version of SketchUp are you testing against?

I tried your sample model in SU2021.1/SU2021.0 and SU2020 and it doesn’t show any Check Validity warnings when I open it.

I tried again, open it in SU2019 would show the warning, but in SU2021 not.

Does this mean that SU2021 ignored the errors?

Maybe there was a bug in the Check Validity that was fixed between these versions…

I’ve not had time to restore any old build of SU to figure out what is going on in the older verison. I think I recall there being something fixed for CheckValidity fixed for SU2021. It might be that you ran into that issue.