This function closes the model. After this call none of the instances and classes within the model can be used anymore, also garbage collection is not allowed anymore, in default compilation the model itself will be known in the kernel, however known to be disabled. Calls containing the model reference will be protected from crashing when called.


//   Visual Studio for Windows
void __declspec(dllexport) __stdcall CloseModel(
            __int64        model

//   Linux, OS-X and non-Visual Studio Windows solutions
void CloseModel(
            int64_t        model

Property model

Size: 64 bit / 8 byte (value)


Here you can find code snippits that show how the API call CloseModel 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");