SaveModel

This function saves the current model on location fileName.

Syntax

//   Visual Studio for Windows
public:
void __declspec(dllexport) __stdcall SaveModel(
            __int64        model,
            const char      * fileName
        );

//   Linux, OS-X and non-Visual Studio Windows solutions
public:
void SaveModel(
            int64_t        model,
            const char      * fileName
        );    

Property model

Size: 64 bit / 8 byte (value)
...

Property fileName

Size: 64 bit / 8 byte (reference)
...

Example

Here you can find code snippits that show how the API call SaveModel can be used.

__int64 rdfModel = CreateModel();

if (rdfModel) {
    __int64 classCone = GetClassByName(rdfModel, "Cone");

    __int64 propertyHeight = GetPropertyByName(rdfModel, "height"),
            propertyRadius = GetPropertyByName(rdfModel, "radius"),
            propertySegmentationParts = GetPropertyByName(rdfModel, "segmentationParts");

    __int64 myInstanceCone = CreateInstance(classCone, nullptr);

    double  height = 2.8,
            radius = 1.3;
    __int64 segmentationParts = 36;
        
    SetDatatypeProperty(myInstanceCone, propertyHeight, &height, 1);
    SetDatatypeProperty(myInstanceCone, propertyRadius, &radius, 1);
    SetDatatypeProperty(myInstanceCone, propertySegmentationParts, &segmentationParts, 1);

    //
    //	The resulting model can be viewed in 3D-Editor.exe
    //
    SaveModel(rdfModel, "c:\\myFile.bin");
    CloseModel(rdfModel);
}