Binary files (files with .bin and .csv extensions) are used for storing big data fragments, for example data of objects associated with
built-in categories.
A comma separated value file stores labels for different parameters and their values.
All labels are stored in a set of separate .csv files located in the CSV subfolder of the BimRv executable folder:
\exe\<version> &mdash for Microsoft® Windows® platforms.
/bin/<version> &mdash for non-Windows platforms.
Label values can be changed at any time, including at runtime.
For simplicity and to avoid performance issues in the example, each set of labels is cached on the first request.
Therefore, runtime changes do not take effect during the current session if labels were already requested.
To further work with labels, use the OdBmLabelUtilsPE class which represents a protocol extension implementing label functionality.
The source code for a sample of this extension reimplementation is available in the /BimRv/Extensions/TB_ExLabelUtils folder.
The OdBmLabelUtilsPE class interface itself is available in the /BimRv/Include/Database/PE/BmLabelUtilsPE.h header file.
The OdBmLabelUtilsPE class provides the following functionality for working with labels:
virtual bool OdBmLabelUtilsPE::isCommon(const OdBm::EnumsWithLabels::Enum) const —
Returns true if the label value is based on macro definitions in BimRv source files; otherwise this method returns false.
In the TB_ExLabelUtils sample protocol extension , the result of the isCommon()
method is evaluated by checking the Checksums.txt file located in the /BimRv/Extensions/TB_ExLabelUtils folder.
The checksum value computed using SHA1 is applied to .csv. SHA1 implementation is located in the /BimRv/Include/Common/BmSHA1.h header file.
virtual bool OdBmLabelUtilsPE::hasValues(const OdBm::EnumsWithLabels::Enum) const —
Returns true if the protocol extension instance returns values for a specified enumeration; otherwise the method returns false.
The following rule is applied for built-in object load: if the TB_ExLabelUtils module is not loaded, or if labels for an associated enumeration
(BmCategory.h for instance) are common, or if labels canʼt be loaded (TB_ExLabelUtils module returns false), then the labels stored in the binaries are used.