Skip to main content

create_work_control

Function create_work_control 

Source
pub fn create_work_control(
    tx: &mut Transaction,
    kind: WorkControlKind,
    draft: WorkControlDraft<'_>,
) -> ScheduleAuthoringResult<EntityId>
Expand description

Stage an IfcWorkPlan or IfcWorkSchedule.

CreationDate and StartTime are required by the schema, so they are plain fields rather than options: a work control without them parses but does not say when the work happens.

§Errors

Refuses a malformed GUID, an empty required timestamp – a blank StartTime writes a schedule that validates and schedules nothing – and a date that is not ISO 8601 text: the IFC2X3 IfcDateTimeSelect records are not IFC4 or IFC4X3 values.

OwnerHistory is written $, which IFC4 and IFC4X3 allow, in their shared layout. This writer takes no model, so it cannot see the declared release: it is for IFC4 and IFC4X3 only. IFC2X3 requires OwnerHistory and lays the record out differently; use create_work_control_with_owner_history there, which binds the release (#202).