C API: API return error code explaination

Hi Expert,
When use the Sketchup API, SUModelCreateFromFileWithStatus can return an error code named “SU_ERROR_SERIALIZATION”, can anyone let me know in what scenarios the API will return such error code? we want to know the scenario to better understand what happens when calling this API.


A moved your topic to right category… :innocent:

1 Like

It basically means an error occurred writing to or reading from file.

In the case of a read, it probably means that the file was corrupted or had a write error when it was written (or saved by the application.)

Here is a similar scenario (with another file write function) being discussed in the API Issue Tracker:

Thank you @DanRathbun , if the file is missing when reading (I can’t think how but just wondering if this happens), will it report SU_ERROR_SERIALIZATION as well?

Move or rename the test file and find out.