pub fn create_control_with_owner_history(
tx: &mut Transaction,
model: &Model,
kind: ControlKind,
global_id: &str,
predefined_type: Option<&str>,
draft: ControlDraft<'_>,
owner_history: EntityId,
) -> ControlResult<EntityId>Expand description
create_control in model’s declared release, with a caller-supplied
IfcOwnerHistory, which IFC2X3 requires (#198, #202).
The release is bound from FILE_SCHEMA (none binds IFC4). In IFC2X3
Identification is written as the entity’s own identifier
(PermitID, RequestID, ID), which IFC2X3 requires; IFC2X3 declares
no PredefinedType for a permit, an action request or a performance
history, no Status for a permit or an action request, and no
LongDescription at all. In IFC4 and IFC4X3 the record is that of
create_control with the reference in the optional slot. The
owner history is never invented: build it with ifc-author.
§Errors
Those of create_control except the IFC2X3 refusal, and:
ControlError::MultipleSchemas or ControlError::UnsupportedSchema
if the model binds no single known release;
ControlError::UnknownEntity if owner_history is neither in the
model nor staged; ControlError::AuthoringInvalid if it is not an
IfcOwnerHistory. Nothing is staged on an error.