Skip to main content

associate_constraint_with_owner_history

Function associate_constraint_with_owner_history 

Source
pub fn associate_constraint_with_owner_history(
    tx: &mut Transaction,
    model: &Model,
    draft: ConstraintAssociationDraft<'_>,
    owner_history: EntityId,
) -> ConstraintResult<EntityId>
Expand description

associate_constraint with a caller-supplied IfcOwnerHistory, which IFC2X3 requires on every IfcRoot.

owner_history must be in the model or staged earlier on tx, and must be an IfcOwnerHistory; one is never invented here (build it with ifc-author). In IFC4 and IFC4X3 the reference fills the optional slot.

ยงErrors

Those of associate_constraint except the IFC2X3 OwnerHistory refusal (an IFC2X3 association without intent is still refused with ConstraintError::AuthoringRequired), and ConstraintError::UnknownEntity for an owner_history that does not resolve or ConstraintError::AuthoringReferenceType for one that is not an IfcOwnerHistory. Nothing is staged on an error.