Skip to main content

create_cost_value

Function create_cost_value 

Source
pub fn create_cost_value(
    tx: &mut Transaction,
    model: &Model,
    draft: CostValueDraft<'_>,
) -> CostAuthoringResult<EntityId>
Expand description

Validate and stage one scalar or explicitly composed cost value in the model’s declared release.

§Errors

A non-finite amount, an empty or non-IfcCostValue component list; a header binding no single verified release (MultipleSchemas, UnsupportedSchema); a date record form the schema’s rules refuse (InvalidValue); a value in the form the release does not declare (AuthoringValueType: IFC2X3 dates are IfcDateTimeSelect records, IFC4 and IFC4X3 dates IfcDate text); a composed value in IFC2X3 (AuthoringNotInSchema: it declares no ArithmeticOperator or Components); and an IFC2X3 value without a category (AuthoringRequired: CostType is required there). Nothing is staged on an error: date records are staged only once the value is accepted.