ifcopenshell.api.constraint.remove_constraint

Module Contents

ifcopenshell.api.constraint.remove_constraint.remove_constraint(file, constraint=None) None

Remove a constraint (typically an objective)

Removes a constraint definition and all of its associations to any products. Typically this would be an IfcObjective, although technically you can associate IfcMetrics ith products too, though the meaning may be unclear.

Parameters:

constraint (ifcopenshell.entity_instance) – The IfcObjective you want to remove.

Returns:

None

Return type:

None

Example:

objective = ifcopenshell.api.run("constraint.add_objective", model)
ifcopenshell.api.run("constraint.remove_constraint", model,
    constraint=objective)