sdaiCreateModelBNUnicode

This call can be used to create an empty model. Every model needs to be opened against a schema, the schema needs to be existing. The file name can be any unicode filename with a character length of 16 bits.

Syntax

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

//   Linux, OS-X and non-Visual Studio Windows solutions
public:
int64_t sdaiCreateModelBNUnicode(
            int64_t repository,
            void    * fileName,
            void    * 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 sdaiCreateModelBNUnicode can be used.

wchar_t * ifcSchemaName;
...

__int64 model = sdaiCreateModelBNUnicode(0, 0, (void *) ifcSchemaName);
if  (model) {
    ...         //  Use the open model to write the content
    ...         //  writen content can directly be used for geometry generation

    wchar_t * ifcFileNameSaving;
    ...

    sdaiSaveModelBNUnicode(model, (void *) ifcFileNameSaving);
    sdaiCloseModel(model);
    model = 0;  //  Not required of course
}