ifcopenshell.api.constraint.edit_metric
¶
Module Contents¶
- ifcopenshell.api.constraint.edit_metric.edit_metric(file, metric=None, attributes=None) 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, optional) – a dictionary of attribute names and values.
- Returns:
None
- Return type:
None
Example:
objective = ifcopenshell.api.run("constraint.add_objective", model) metric = ifcopenshell.api.run("constraint.add_metric", model, objective=objective) ifcopenshell.api.run("constraint.edit_metric", model, metric=metric, attributes={"ConstraintGrade": "HARD"})