Skip to main content

create_cost_item

Function create_cost_item 

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

Validate and stage one cost item in the model’s declared release, with OwnerHistory unset.

All references may target the model or entities staged earlier in tx.

§Errors

A malformed or duplicate GlobalId; USERDEFINED without ObjectType; a cost value that is not an IfcCostValue; a header binding no single known release (MultipleSchemas, UnsupportedSchema); a value the release does not declare (AuthoringNotInSchema: IFC2X3 has no Identification, PredefinedType or CostValues); and an IFC2X3 model, which requires OwnerHistory (AuthoringRequired: use create_cost_item_with_owner_history). Nothing is staged on an error.