Skip to main content

assign_schedule_items

Function assign_schedule_items 

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

Validate and stage a schedule-to-items IfcRelAssignsToControl, with OwnerHistory unset.

RelatedObjectsType is left unset. IFC4 redeclares it as OPTIONAL IfcStrippedOptional, a BOOLEAN retained only so older files still parse; the IFC2x3 reading, where it named the common type of the related objects, no longer applies. Writing .CONTROL. there put an enumeration token in a boolean slot – a file that parses and is wrong. The constraint that every target is an exact IfcCostItem is still enforced, by the reference check below.

§Errors

A malformed or duplicate GlobalId; an empty or duplicated item list; a schedule that is not an IfcCostSchedule or an item that is not an IfcCostItem; a header binding no single known release; and an IFC2X3 model, which requires OwnerHistory (use assign_schedule_items_with_owner_history). Nothing is staged on an error.