Skip to main content

create_spatial_element_with_owner_history

Function create_spatial_element_with_owner_history 

Source
pub fn create_spatial_element_with_owner_history(
    tx: &mut Transaction,
    model: &Model,
    kind: SpatialKind,
    global_id: &str,
    draft: SpatialDraft<'_>,
    owner_history: EntityId,
) -> SpatialAuthoringResult<EntityId>
Expand description

create_spatial_element in the model’s declared release, with a caller-supplied IfcOwnerHistory, which IFC2X3 requires.

IFC2X3 also requires CompositionType, and an IfcSpace’s InteriorOrExteriorSpace, which SpatialDraft::interior_or_exterior carries (#214). That value is refused with AuthoringNotInSchema on any other container and in IFC4 and IFC4X3, which do not declare it, and with AuthoringValueType for a token outside IFC2X3’s IfcInternalOrExternalEnum.

§Errors

Those of create_spatial_element, a value the release cannot hold, and the release and owner-history refusals of aggregate_with_owner_history. Nothing is staged on an error.