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

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

[DllImport(IFCEngineDLL, EntryPoint = "sdaiCreateModelBNUnicode")]
public static extern Int32 sdaiCreateModelBNUnicode(Int32 repository, byte[] fileName, byte[] schemaName);    

Property repository

Size: 32 bit / 4 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: 32 bit / 4 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: 32 bit / 4 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.

Int32 model = IfcEngine.x86.sdaiCreateModelBNUnicode(0, null, 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.x86.sdaiSaveModelBNUnicode(model, System.Text.Encoding.Unicode.GetBytes(ifcFileNameSaving));

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