/////////////////////////////////////////////////////////////////////////////// // Copyright (C) 2002-2025, Open Design Alliance (the "Alliance"). // All rights reserved. // // This software and its documentation and related materials are owned by // the Alliance. The software may only be incorporated into application // programs owned by members of the Alliance, subject to a signed // Membership Agreement and Supplemental Software License Agreement with the // Alliance. The structure and organization of this software are the valuable // trade secrets of the Alliance and its suppliers. The software is also // protected by copyright law and international treaty provisions. Application // programs incorporating this software must include the following statement // with their copyright notices: // // This application incorporates Open Design Alliance software pursuant to a license // agreement with Open Design Alliance. // Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance. // All rights reserved. // // By use of this software, its documentation or related materials, you // acknowledge and accept the above terms. /////////////////////////////////////////////////////////////////////////////// #ifndef _IFC_COBIE_H #define _IFC_COBIE_H #include "OdPlatformSettings.h" #include "COBieBuildOptions.h" #include "RxObject.h" #include "daiSession.h" #include "daiRepository.h" #include "DbHostAppProgressMeter.h" #include "IfcEntity.h" #define COBIE_PROGRESSMETER_LIMIT 18 namespace OdCOBie { class OdIfc2COBieImpl; /** \details A class that implements creation of COBie spreadsheet from IFC model data. */ class COBIE_EXPORT Ifc2COBie : public OdRxObject { ODRX_DECLARE_MEMBERS(Ifc2COBie); public: /** \details Creates a new Ifc2COBie object with default parameters. */ Ifc2COBie(); /** \details Destroys the Ifc2COBie object. */ ~Ifc2COBie(); /** \details Processes the IFC model and creates a COBie model based on the IFC model. \param ifcModel [in] Pointer to an IFC model object. \param pMeter [in] A pointer to an OdDbHostAppProgressMeter object or a null pointer. \returns eOk if the model was processed successfully; otherwise, the method returns an appropriate error code. */ OdResult process(const OdDAI::Model* ifcModel, OdDbHostAppProgressMeter* pMeter); /** \details Exports a COBie model to an Excel file. \param fileName [in] Pointer to a string, containing the file name. \returns eOk if the COBie model was successfully exported; otherwise, the method returns an appropriate error code. \remarks Before exporting a COBie model, you must process the IFC model, calls process(ifcModel, pMeter) internally. */ OdResult ExportToExcel(const char* fileName); /** \details Retrieves the COBie model. \returns the COBie model. \remarks Before accessing a COBie model, IFC model must be assigned, calls process(ifcModel, pMeter). */ OdDAI::ModelPtr spreadsheet(); /** \details Retrieves a list of table names used in COBie. \returns Array of table names. */ OdAnsiStringArray& getCobieTablesNames(); /** \details Retrieves a list of attribute names for the specified entity. \param pEntity [in] The entity for which you need to get a list of attribute names. \param list [out] Receives a list of attribute names. */ void getAttributesList(OdDAI::EntityPtr pEntity, OdAnsiStringArray& list); private: OdIfc2COBieImpl* m_pImpl; }; /** \details A data type that represents a smart pointer to an Ifc2COBie object. */ typedef OdSmartPtr Ifc2COBiePtr; } #endif //_IFC_COBIE_H