Skip to main content

attach_type

Function attach_type 

Source
pub fn attach_type(
    tx: &mut Transaction,
    model: &Model,
    global_id: &str,
    objects: &[EntityId],
    relating_type: EntityId,
) -> PropertyResult<EntityId>
Expand description

Attach a type object to its occurrences with IfcRelDefinesByType.

The counterpart of super::authoring::attach_property_set: properties carried by a type reach its occurrences through this relationship, which is why IfcRelDefinesByProperties refuses a type object outright.

§Release

Bound to the model’s declared release like super::authoring::attach_property_set: laid out by attribute name, type checks against that release’s inheritance, and an IFC2X3 model refused with AuthoringRequired because its OwnerHistory would be $. Use attach_type_with_owner_history there.

§Errors

Refuses a malformed GUID, an empty occurrence list (SET [1:?]), a relating type that is not an IfcTypeObject subtype, and any occurrence that is itself a type object; a model that binds no single known release, and an IFC2X3 model. Nothing is staged on an error.