Skip to main content

create_cost_schedule

Function create_cost_schedule 

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

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

§Errors

A malformed or duplicate GlobalId; USERDEFINED without ObjectType; a header binding no single known release; a date record form the schema’s rules refuse (InvalidValue: a month outside 1..=12, a day the month does not have, an hour, minute or second out of range, a second without a minute); a date in the form the release does not declare (AuthoringValueType: IFC2X3 types SubmittedOn and UpdateDate as IfcDateTimeSelect records, IFC4 and IFC4X3 as IfcDateTime text); a required value left unset (AuthoringRequired: IFC2X3 requires ID, written from identification, and PredefinedType); and an IFC2X3 model, which requires OwnerHistory (use create_cost_schedule_with_owner_history). Nothing is staged on an error: IFC2X3 date records are staged only once the schedule itself is accepted.