setStringUnicode

...

Syntax

//   Visual Studio for Windows
public:
__int32 __declspec(dllexport) __stdcall setStringUnicode(
            __int32 unicode
        );

//   Linux, OS-X and non-Visual Studio Windows solutions
public:
int32_t setStringUnicode(
            int32_t unicode
        );    

Property unicode

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

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');
//
__int32	ifcPostalAddressInstance = sdaiCreateInstanceBN(model, L"IFCPOSTALADDRESS");

__int32	* addressLines = sdaiCreateAggrBN(ifcPostalAddressInstance, L"AddressLines");
sdaiAppend((__int32) addressLines, sdaiUNICODE, L"RDF Ltd.");
sdaiAppend((__int32) addressLines, sdaiUNICODE, L"Main Office");

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