sdaiSaveModelBN
Syntax
// // Strong typing definition // void sdaiSaveModelBN( SdaiModel model, const char * fileName ); static inline void sdaiSaveModelBN( SdaiModel model, char * fileName ) { return sdaiSaveModelBN( model, (const char*) fileName ); } // // Weak typing definition // void __declspec(dllexport) __stdcall sdaiSaveModelBN( int_t model, const char * fileName ); static inline void sdaiSaveModelBN( int_t model, char * fileName ) { return sdaiSaveModelBN( model, (const char*) fileName ); }
Property model
Size: 64 bit / 8 byte (value)Property fileName
Size: 64 bit / 8 byte (reference)
Example (based on pure API calls)
Here you can find code snippits that show how the API call sdaiSaveModelBN can be used.
#include "./include/ifcengine.h" #include <iostream> void OpenModel( const char * fileNameIN, const char * fileNameOUT ) { // // The advised manner of opening an IFC (or ifcXML) file is by using embedded schema's that can be recognized automatically // SdaiModel model = sdaiOpenModelBN(0, fileNameIN, ""); if (model) { SdaiInteger entityCount = engiGetEntityCount(model), instanceCount = 0; for (SdaiInteger i = 0; i < entityCount; i++) { SdaiEntity entity = engiGetEntityElement(model, i); SdaiAggr ifcInstances = sdaiGetEntityExtent(model, entity); SdaiInteger noIfcInstances = sdaiGetMemberCount(ifcInstances); instanceCount += noIfcInstances; } std::cout << "entity count (schema): " << entityCount << "\n"; std::cout << "instance count (ifc file): " << instanceCount << "\n"; sdaiOpenModelBN(model, fileNameOUT); sdaiCloseModel(model); } }