ifcopenshell.api.control.unassign_control
¶
Module Contents¶
- ifcopenshell.api.control.unassign_control.unassign_control(file: ifcopenshell.file, relating_control: ifcopenshell.entity_instance, related_object: ifcopenshell.entity_instance) ifcopenshell.entity_instance | None ¶
Unassigns a planning control or constraint to an object
- Parameters:
relating_control (ifcopenshell.entity_instance) – The IfcControl entity that is creating the control or constraint
related_object (ifcopenshell.entity_instance) – The IfcObjectDefinition that is being controlled
- 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.root.create_entity(model, ifc_class="IfcWall") schedule = ifcopenshell.api.cost.add_cost_schedule(model) cost_item = ifcopenshell.api.cost.add_cost_item(model, cost_schedule=schedule) ifcopenshell.api.control.assign_control(model, relating_control=cost_item, related_object=wall) # And now let's change our mind ifcopenshell.api.control.unassign_control(model, relating_control=cost_item, related_object=wall)