pub fn create_quantity_with(
tx: &mut Transaction,
model: &Model,
kind: QuantityKind,
name: &str,
value: f64,
extras: QuantityExtras<'_>,
) -> Result<EntityId, PropertyError>Expand description
Stage a simple quantity with its optional attributes, in model’s
release.
§The record has the release’s layout
Attributes are placed by name in the declared release’s table. IFC4 and
IFC4X3 quantities have five attributes (Name, Description, Unit,
the value, Formula); IFC2X3 ones have four, with no Formula. A
model without FILE_SCHEMA binds IFC4. The value is written bare
(IFCQUANTITYAREA('A',$,$,12.5,$)), since its declared type is a
defined measure and not a SELECT.
§Errors
Nothing is staged on an error:
PropertyError::MultipleSchemasorPropertyError::UnsupportedSchema: the model binds no single release.PropertyError::EntityNotInSchema: the release does not declare the kind, asIfcQuantityNumberoutside IFC4X3.PropertyError::AuthoringNotInSchema: aFormulafor an IFC2X3 model, which has none.PropertyError::AuthoringInvalid: a non-finite value, or a fractional count whereIfcCountMeasureisINTEGER(IFC4X3). In IFC2X3 and IFC4 it isNUMBER, so a fractional count is written as a real, and never truncated.