Skip to main content

create_facility

Function create_facility 

Source
pub fn create_facility(
    tx: &mut Transaction,
    kind: Facility,
    global_id: &str,
    predefined_type: Option<&str>,
    draft: FacilityDraft<'_>,
) -> FacilityResult<EntityId>
Expand description

Stage a facility or facility part.

kind carries its own slot layout and its own enum, so a part and a facility cannot be confused for one another.

IFC4X3 only, as are the classes: it writes the IFC4X3 layout with OwnerHistory $. create_facility_with_owner_history binds the model’s declared release and takes an IfcOwnerHistory.

§Errors

Refuses a malformed GlobalId; a PredefinedType or UsageType token outside this exact class’s enum; a PredefinedType on a class that declares none; a missing UsageType on a part; a UsageType on a class that declares none; and USERDEFINED in either attribute without an ObjectType naming it.