Skip to main content

create_metric

Function create_metric 

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

Validate and stage one metric in the model’s declared release.

§Release

IFC4 and IFC4X3 declare eleven attributes. IFC2X3 declares ten: no ReferencePath, a required DataValue, CreationTime as an IfcDateTimeSelect record, and an IfcBenchmarkEnum without IFC4’s INCLUDES, NOTINCLUDES, INCLUDEDIN and NOTINCLUDEDIN.

§Errors

A user-defined grade without UserDefinedGrade; a reference outside its declared type in the release; a header binding no single verified release (MultipleSchemas, UnsupportedSchema); a value the release does not declare (AuthoringNotInSchema) or cannot hold (AuthoringValueType: a token its enumeration lacks, text where it declares a record); a data value type outside the release’s IfcMetricValueSelect (AuthoringInvalid); and a required value left unset (AuthoringRequired). Nothing is staged on an error.