cwindowssketchup

How to set icon for created .skp file by using C API?


Currently I am trying to create .skp files from some external geometry data.

I have managed to create all required geometries, but after i save model by using following code:

    if (SUModelSaveToFileWithVersion(model, model_path, SUModelVersion::SUModelVersion_SU2018) != SU_ERROR_NONE){
        return 0;
    }
    if (SUModelRelease(&model) != SU_ERROR_NONE){
        return 0;
    }
    SUTerminate();

model is saved without small preview icon(general .skp icon is used).

Is there a way to replace it with at least a white icon?


Solution

  • This would be a bug in the API when saving. I'm afraid there is not workaround for that via the C API. (Btw, you can report issues in the SketchUp API issue tracker: https://github.com/SketchUp/api-issue-tracker/issues)