ifcopenshell.api.control.unassign_control

Module Contents

ifcopenshell.api.control.unassign_control.unassign_control(file, relating_control=None, related_object=None) None

Unassigns a planning control or constraint to an object

Parameters:
Returns:

If the control still is related to other objects, the IfcRelAssignsToControl is returned, otherwise None.

Return type:

ifcopenshell.entity_instance, None

Example:

# Let's relate a cost item and a product
wall = ifcopenshell.api.run("root.create_entity", model, ifc_class="IfcWall")
schedule = ifcopenshell.api.run("cost.add_cost_schedule", model)
cost_item = ifcopenshell.api.run("cost.add_cost_item", model,
    cost_schedule=schedule)
ifcopenshell.api.run("control.assign_control", model,
    relating_control=cost_item, related_object=wall)

# And now let's change our mind
ifcopenshell.api.run("control.unassign_control", model,
    relating_control=cost_item, related_object=wall)