sdaiCreateModelBNUnicode
Attributes repository and fileName will be ignored, they are their because of backward compatibility.
A handle to the model will be returned, or 0 in case something went wrong.
Syntax
// // Strong typing definition // SdaiModel sdaiCreateModelBNUnicode( SdaiRep repository, const wchar_t * fileName, const wchar_t * schemaName ); static inline SdaiModel sdaiCreateModelBNUnicode( SdaiRep repository, wchar_t * fileName, wchar_t * schemaName ) { return sdaiCreateModelBNUnicode( repository, (const wchar_t*) fileName, (const wchar_t*) schemaName ); } // // Weak typing definition // int_t __declspec(dllexport) __stdcall sdaiCreateModelBNUnicode( int_t repository, const wchar_t * fileName, const wchar_t * schemaName ); static inline int_t sdaiCreateModelBNUnicode( int_t repository, wchar_t * fileName, wchar_t * schemaName ) { return sdaiCreateModelBNUnicode( repository, (const wchar_t*) fileName, (const wchar_t*) schemaName ); }
Property repository
Size: 64 bit / 8 byte (value)Property fileName
Size: 64 bit / 8 byte (reference)Property schemaName
Size: 64 bit / 8 byte (reference)
Example (based on pure API calls)
Here you can find code snippits that show how the API call sdaiCreateModelBNUnicode can be used.
#include "./include/ifcengine.h" #include <iostream> void OpenModel__optionI( ) { // // It is possible to create a file based on an embedded schema. // The following options are available for embedded schemas: // IFC2X3 (version 2.3.0.1, i.e. IFC2x3 TC1 'ISO/PAS 16739:2005') // IFC4 (version 4.0.2.1, i.e. IFC4 ADD2 TC1 'ISO 16739-1:2018') // IFC4X1 (version 4.1.0.0, i.e. IFC4.1) // IFC4X2 (version 4.2.0.0, i.e. IFC4.2) // IFC4X3 (version 4.3.2.0, i.e. IFC4.3 ADD2) // IFC4X4 (in development, i.e. IFC4.4) // AP203 (ISO 10303-203:2011 edition 2) if STEP Engine code part is embedded in the compiled library // AP214 (ISO 10303-214:2010 edition 3) if STEP Engine code part is embedded in the compiled library // AP242 (ISO 10303-242:2022 edition 3) if STEP Engine code part is embedded in the compiled library // CIS/2 if CIS/2 Engine code part is embedded in the compiled library // SdaiModel model = sdaiCreateModelBNUnicode(0, L"IFC4"); if (model) { SdaiInteger entityCount = engiGetEntityCount(model), instanceCount = 0; std::cout << "entity count (schema): " << entityCount << "\n"; sdaiCloseModel(model); } } void OpenModel__optionII( const char * schemaName ) { // // It is also possible to load a schema file (.exp) // This schema can be one of the supported schemas, however it is // also possible to use an adjusted or fully self developed schema // // Adjusted schemas will still support geometrical concepts (depending on the adjustments) // SdaiModel model = sdaiCreateModelBNUnicode(0, schemaName); if (model) { SdaiInteger entityCount = engiGetEntityCount(model), instanceCount = 0; std::cout << "entity count (schema): " << entityCount << "\n"; sdaiCloseModel(model); } }