This call can be used to save a model in XML Format, this XML serialization is advised for ifcXML files of schema IFC2x3 TC1 and before. The file name can be any unicode filename with a character length of 16 bits.


//   Visual Studio for Windows
void __declspec(dllexport) __stdcall sdaiSaveModelAsXmlBNUnicode(
            __int64 model,
            void    * fileName

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

Property model

Size: 64 bit / 8 byte (value)
Handle of the model containing the IFC file, this handle is needed in many other calls and given when the model is created.

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'.


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

wchar_t * ifcFileName, * ifcSchemaName;     //  The schema file is expected to be IFC2X3_TC1.exp as this XML format is typically used for IFC 2x3 (TC1)

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

    wchar_t * ifcFileNameSaving;            //  The file name is expected to end at .ifx or .ifcXML, this is of course totally free from technical Point-Of-View

    sdaiSaveModelAsXmlBNUnicode(model, (void *) ifcFileNameSaving);
    model = 0;  //  Not required of course