pub fn exact_unit(
model: &Model,
measure_type: &str,
explicit_unit: Option<EntityId>,
) -> Result<ExactUnit, ExactUnitError>Expand description
Resolve the effective unit of a measure to an exact SI conversion.
measure_type is the value’s declared type, e.g. IFCAREAMEASURE;
explicit_unit is IfcPropertySingleValue.Unit when stated. Without an
explicit unit the project default of the needed type applies. The model
binds to the release its FILE_SCHEMA declares, IFC2X3, IFC4 or IFC4X3,
and every table is that release’s.
§Errors
Any ExactUnitError: the answer is refused whenever the unit is
missing, ambiguous, inconsistent, cyclic, or not convertible exactly, or
when the reader reported a record the resolution reads
(ExactUnitError::DamagedRecord).