sdaiOpenModelBN

This call is used to open a model with normal ASCII character namings. The property repository is expected to be 0 in all cases, however will be ignored. The property fileName is optional and can be 0 or an empty string, i.e. ""; in both cases an empty model against the defined schema is created. The property schemaName is non optional and has to link to an existing valid schema.

Syntax

//   Visual Studio for Windows
public:
__int64 __declspec(dllexport) __stdcall sdaiOpenModelBN(
            __int64 repository,
            char    * fileName,
            char    * schemaName
        );

//   Linux, OS-X and non-Visual Studio Windows solutions
public:
int64_t sdaiOpenModelBN(
            int64_t repository,
            char    * fileName,
            char    * schemaName
        );    

Property repository

Size: 64 bit / 8 byte (value)
Not relevant within the IFC Engine DLL, although several models can be loaded at once, they will always be in separate models.

Property fileName

Size: 64 bit / 8 byte (reference)
Address of string containing the path of the IFC file, for example 'C:\myPath\myFile.ifc' or 'C:\myPath\myFile.ifcXML'.

Property schemaName

Size: 64 bit / 8 byte (reference)
Address of string containing the path of the IFC schema, for example 'C:\myPath\IFC4.exp'.

Examples

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

char    * ifcFileName, * ifcSchemaName;
...

__int64 model = sdaiOpenModelBN(0, ifcFileName, ifcSchemaName);
if  (model) {
    ...         //  Use the open model to read/write/edit the content
    ...         //  or to create geometry

    char    * ifcFileNameSaving;
    ...

    sdaiSaveModelBN(model, ifcFileNameSaving);
    sdaiCloseModel(model);
    model = 0;  //  Not required of course
}