setStringUnicode

Set mode of interpretation for arguments of type char* 0 - char* (default) 1 - wchar_t* 2 - char16_t* 4 - char32_t*

Syntax

public const string ifcenginedll = @"ifcengine.dll";

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

Property unicode

Size: 32 bit / 4 byte (value)
...

Example (based on pure API calls)

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

using RDF;      //  include at least engine.cs within your solution

ifcengine.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.sdaiCreateInstanceBN(model, System.Text.Encoding.Unicode.GetBytes("IFCPOSTALADDRESS"));

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

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