engiSaveSchemaBN

This function saves the schema.

Syntax

//
//   Strong typing definition
//
bool            engiSaveSchemaBN(
                        SdaiModel               model,
                        SdaiString              filePath
                    );

static  inline  bool    engiSaveSchemaBN(
                                SdaiModel               model,
                                char                    * filePath
                            )
{
    return  engiSaveSchemaBN(
                    model,
                    (SdaiString) filePath
                );
}


//
//   Weak typing definition
//
bool    __declspec(dllexport) __stdcall engiSaveSchemaBN(
                                                int_t                   model,
                                                const char              * filePath
                                            );

static  inline  bool    engiSaveSchemaBN(
                                int_t                   model,
                                char                    * filePath
                            )
{
    return  engiSaveSchemaBN(
                    model,
                    (const SdaiString) filePath
                );
}
    

Property model

Size: 32 bit / 4 byte (value)
The handle to the model. The model handle is static during its existance. Several models can be opened simultaniously within one session. Different models are always independent, threads are allowed to be running on different models simultaniously.

Property filePath

Size: 32 bit / 4 byte (reference)
The file path of the file as available in the file system in ASCII (char *). The given char array will not be adjusted, on each OS the size of a char element is 8 bit / 1 byte.

Example (based on pure API calls)

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

#include    "./include/ifcengine.h"

void    CreateSchemaFile(
            )
{
    const std::string model_text{
            "ISO-10303-21;\n"
            "HEADER;\n"
            "FILE_DESCRIPTION(('ViewDefinition [CoordinationView]'),'2;1'); \n"
            "FILE_NAME ($, $, (), (), $, $, $);\n"
            "FILE_SCHEMA (('IFC4'));\n"
            "ENDSEC;\n"
            "DATA;\n"
            "#1 = IFCPROPERTYSINGLEVALUE('PropertyName', $, IFCTEXT('test'), #2);\n"
            "#2 = IFCSIUNIT(*,.LENGTHUNIT.,$,.METRE.);\n"
            "ENDSEC;\n"
            "END-ISO-10303-21;\n"
        };

    SdaiModel   model = engiOpenModelByArray(0, model_text, "");

    if (model) {
        engiSaveSchemaBN(model, "c:\\schemas\\IFC4.exp");

        sdaiCloseModel(model);
    }
}