sdaiCreateInstanceBN

...

Syntax

//   Visual Studio for Windows
public:
__int64 __declspec(dllexport) __stdcall sdaiCreateInstanceBN(
            __int64 model,
            char    * entityName
        );

//   Linux, OS-X and non-Visual Studio Windows solutions
public:
int64_t sdaiCreateInstanceBN(
            int64_t model,
            char    * entityName
        );    

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 entityName

Size: 64 bit / 8 byte (reference)
Name of the entity (schema item/class), for example IFCWALLSTANDARDCASE as defined in IFC4.exp.

Examples

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

//
//  Created result when stored as IFC:
//  #31313 = IFCPOSTALADDRESS($, $, $, $, ('RDF Ltd.', 'Main Office'), '32', 'Bankya', 'Sofia', '1320', 'Bulgaria');
//
__int64	ifcPostalAddressInstance = sdaiCreateInstanceBN(model, "IFCPOSTALADDRESS");

__int64	* addressLines = sdaiCreateAggrBN(ifcPostalAddressInstance, "AddressLines");
sdaiAppend((__int64) addressLines, sdaiSTRING, "RDF Ltd.");
sdaiAppend((__int64) addressLines, sdaiSTRING, "Main Office");

sdaiPutAttrBN(ifcPostalAddressInstance, "PostalBox", sdaiSTRING, "32");
sdaiPutAttrBN(ifcPostalAddressInstance, "Town", sdaiSTRING, "Bankya");
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.
sdaiPutAttrBN(ifcPostalAddressInstance, "Country", sdaiSTRING, "Bulgaria");