I have downloaded your latest API from this page, but when I open the model_version.h, I don’t view SUModelVersion_SU2022, I just view the latest version of SUModel is SUModelVersion_SU2021. But the name of the SDK is SDK_WIN_x64_2022-0-316.
And sometimes, I call API
int major = 0;
int minor = 0;
int build = 0;
SUModelGetVersion(model, &major, &minor, &build)
to get the major of a model, the major will be returned with 2022. This is one thing make me amazed. Then I want to write the model to one path use the major version, I use flowing API:
SUModelSaveToFileWithVersion(model, filepath, save_model_version);
This function third argument is a version parameter, If I use the 2022, but I can’t find the enum SUModelVersion to match the 2022! I put the SDK version info define in model_version.h and I make sure the file is latest.
enum SUModelVersion {
SUModelVersion_SU3, ///< SketchUp 3
SUModelVersion_SU4, ///< SketchUp 4
SUModelVersion_SU5, ///< SketchUp 5
SUModelVersion_SU6, ///< SketchUp 6
SUModelVersion_SU7, ///< SketchUp 7
SUModelVersion_SU8, ///< SketchUp 8
SUModelVersion_SU2013, ///< SketchUp 2013
SUModelVersion_SU2014, ///< SketchUp 2014
SUModelVersion_SU2015, ///< SketchUp 2015
SUModelVersion_SU2016, ///< SketchUp 2016
SUModelVersion_SU2017, ///< SketchUp 2017
SUModelVersion_SU2018, ///< SketchUp 2018
SUModelVersion_SU2019, ///< SketchUp 2019
SUModelVersion_SU2020, ///< SketchUp 2020
SUModelVersion_SU2021, ///< SketchUp 2021
SUModelVersion_Current = SUModelVersion_SU2021 ///< The most current version supported. Added in
///< SketchUp 2022, API 10.0.
};