Skip to main content

serve_buildings

Function serve_buildings 

Source
pub fn serve_buildings(
    tx: &mut Transaction,
    model: &Model,
    global_id: &str,
    system: EntityId,
    buildings: &[EntityId],
) -> SpatialAuthoringResult<EntityId>
Expand description

Stage an IfcRelServicesBuildings in model’s declared release, with OwnerHistory $: system serves buildings.

IFC2X3 requires OwnerHistory, so there this refuses with AuthoringRequired; use serve_buildings_with_owner_history.

§Errors

Invalid for a malformed GlobalId, an empty or repeating building set, the system among its own buildings, or a system that already services buildings (ServicesBuildings is SET [0:1]); MultipleSchemas or UnsupportedSchema when the header binds no single verified release; MissingReference for a system or building neither in the model nor staged; WrongReferenceType for a system that is not an IfcSystem, or a building the release’s RelatedBuildings does not admit. Nothing is staged on an error.