sdaiSaveModelBNUnicode

This call can be used to save a model in SPF Format (Step Physical File Format), this is currently still the default format for IFC files. The file name can be any unicode filename with a character length of 16 bits.

Syntax

public const string IFCEngineDLL = @"IFCEngine.dll";

[DllImport(IFCEngineDLL, EntryPoint = "sdaiSaveModelBNUnicode")]
public static extern void sdaiSaveModelBNUnicode(Int64 model, byte[] 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'.

Examples

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

string ifcFileName = "myFile 友𠂇又.ifc";

Int64 model = IfcEngine.x64.sdaiOpenModelBNUnicode(0, System.Text.Encoding.Unicode.GetBytes(ifcFileName), System.Text.Encoding.Unicode.GetBytes("IFC2X3_TC1.exp"));

if (model != 0)
{
    ...         //  Use the open model to read/write/edit the content
    ...         //  or to create geometry

    string ifcFileNameSaving = "mySavedFile 友𠂇又.ifc";

    IfcEngine.x64.sdaiSaveModelBNUnicode(model, System.Text.Encoding.Unicode.GetBytes(ifcFileNameSaving));

    IfcEngine.x64.sdaiCloseModel(model);
    model = 0;  //  Not required of course
}