ifcopenshell.api.constraint.edit_metric

Module Contents

ifcopenshell.api.constraint.edit_metric.edit_metric(file: ifcopenshell.file, metric: ifcopenshell.entity_instance, attributes: dict[str, Any]) None

Edit the attributes of a metric

For more information about the attributes and data types of an IfcMetric, consult the IFC documentation.

Parameters:
  • metric (ifcopenshell.entity_instance) – The IfcMetric you want to edit.

  • attributes (dict) – a dictionary of attribute names and values.

Returns:

None

Return type:

None

Example:

objective = ifcopenshell.api.constraint.add_objective(model)
metric = ifcopenshell.api.constraint.add_metric(model,
    objective=objective)
ifcopenshell.api.constraint.edit_metric(model,
    metric=metric, attributes={"ConstraintGrade": "HARD"})