ifcopenshell.api.constraint.remove_constraint#

Module Contents#

class ifcopenshell.api.constraint.remove_constraint.Usecase(file, constraint=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.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)
execute(self)#