Skip to main content

create_reference

Function create_reference 

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

Stage an IfcReference.

A reference is a path expression: it names a type, an attribute, and optionally positions within a list, chaining through InnerReference to address something nested. Every slot is OPTIONAL, so the schema permits a reference that addresses nothing; that is a silently useless record, so at least one slot must be set here.

ListPositions is LIST [1:?] OF IfcInteger and the positions are 1-based: an empty list fails the bound, and a zero or negative index addresses no element. Both are refused rather than written.

ยงErrors

Refuses a fully empty draft, an empty or non-positive ListPositions, an inner_reference that is not itself an IfcReference, a header binding no single verified release, and an IFC2X3 model, which declares no IfcReference (EntityNotInSchema).