pub fn assign_to_control(
tx: &mut Transaction,
model: &Model,
schema: &Schema,
draft: ControlAssignmentDraft<'_>,
) -> ControlResult<EntityId>Expand description
Stage one IfcRelAssignsToControl relating work to an owned control.
References may target the model or entities staged earlier in tx.
The record is laid out by attribute name in schema, so a schema that
moves a slot produces a correct record rather than a shifted one.
OwnerHistory is left unset, which IFC4 and IFC4X3 allow; an IFC2X3
schema requires it and is refused with
ControlError::AuthoringRequired (use
assign_to_control_with_owner_history).
ยงErrors
Refuses a malformed GlobalId; a relating control or related object
that exists neither in model nor in tx; a relating control that
is not one of the four ControlKinds; an empty or duplicated
RelatedObjects; the control among its own related objects; a
related object that is not an IfcObjectDefinition; a schema that
does not declare the relationship; and an IFC2X3 schema. Nothing is
staged on an error.