Skip to main content

create_approval

Function create_approval 

Source
pub fn create_approval(
    tx: &mut Transaction,
    model: &Model,
    draft: ApprovalDraft<'_>,
) -> ApprovalResult<EntityId>
Expand description

Validate and stage one approval in the model’s declared release.

§Release

IFC4 and IFC4X3 declare nine attributes and require at least one of Identifier and Name. IFC2X3 declares seven and requires Identifier, Name and ApprovalDateTime (the IFC4 TimeOfApproval) as an IfcDateTimeSelect record; it declares no Status, Level, Qualifier, RequestingApproval or GivingApproval under those names.

§Errors

Neither identifier nor name; an actor that is not an IfcActorSelect; a date record that is not a date record of the release; a header binding no single verified release (MultipleSchemas, UnsupportedSchema); a value the release does not declare (AuthoringNotInSchema) or cannot hold (AuthoringValueType: text where IFC2X3 declares a record, a record where IFC4 declares text); and a required value left unset (AuthoringRequired). Nothing is staged on an error.