setStringUnicode

...

Syntax

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

[DllImport(IFCEngineDLL, EntryPoint = "setStringUnicode")]
public static extern Int64 setStringUnicode(Int64 unicode);    

Property unicode

Size: 64 bit / 8 byte (value)
If non-zero entity names and attribute names given are expected to be in wchar_t format, in case unicode = 0 the names expected to be given as ASCII.

Examples

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

IfcEngine.x64.setStringUnicode(1);       //  Normal to define this early, even before opening the model

...
...

//
//  Created result when stored as IFC:
//  #31313 = IFCPOSTALADDRESS($, $, $, $, ('RDF Ltd.', 'Main Office'), '32', 'Bankya', 'Sofia', '1320', 'Bulgaria');
//
Int64 ifcPostalAddressInstance = IfcEngine.x64.sdaiCreateInstanceBN(model, System.Text.Encoding.Unicode.GetBytes("IFCPOSTALADDRESS"));

Int64 addressLines = IfcEngine.x64.sdaiCreateAggrBN(ifcPostalAddressInstance, System.Text.Encoding.Unicode.GetBytes("AddressLines"));
IfcEngine.x64.sdaiAppend(addressLines, IfcEngine.x64.sdaiUNICODE, System.Text.Encoding.Unicode.GetBytes("RDF Ltd."));
IfcEngine.x64.sdaiAppend(addressLines, IfcEngine.x64.sdaiUNICODE, System.Text.Encoding.Unicode.GetBytes("Main Office"));

IfcEngine.x64.sdaiPutAttrBN(ifcPostalAddressInstance, System.Text.Encoding.Unicode.GetBytes("PostalBox"), IfcEngine.x64.sdaiSTRING, System.Text.Encoding.UTF8.GetBytes("32"));      //  It is allowed to mix sdaiUNICODE and sdaiSTRING
IfcEngine.x64.sdaiPutAttrBN(ifcPostalAddressInstance, System.Text.Encoding.Unicode.GetBytes("Town"), IfcEngine.x64.sdaiUNICODE, System.Text.Encoding.Unicode.GetBytes("Bankya"));   //  as long as each call is consitent in itself.
IfcEngine.x64.setStringUnicode(0);                                                            //  Possible but something that normally would not happen
IfcEngine.x64.sdaiPutAttrBN(ifcPostalAddressInstance, System.Text.Encoding.UTF8.GetBytes("Region"), IfcEngine.x64.sdaiSTRING, System.Text.Encoding.UTF8.GetBytes("Sofia"));         //  It is allowed to mix sdaiUNICODE and sdaiSTRING
IfcEngine.x64.sdaiPutAttrBN(ifcPostalAddressInstance, System.Text.Encoding.UTF8.GetBytes("PostalCode"), IfcEngine.x64.sdaiUNICODE, System.Text.Encoding.Unicode.GetBytes("1320"));  //  as long as each call is consitent in itself.
IfcEngine.x64.setStringUnicode(1);                                                            //  Possible but something that normally would not happen
IfcEngine.x64.sdaiPutAttrBN(ifcPostalAddressInstance, System.Text.Encoding.Unicode.GetBytes("Country"), IfcEngine.x64.sdaiUNICODE, System.Text.Encoding.Unicode.GetBytes("Bulgaria"));