mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-20 20:22:09 +00:00
control.unassign_control to support batching
This commit is contained in:
@@ -154,10 +154,7 @@ def unassign_cost_item_type(
|
||||
"""
|
||||
if not product_types:
|
||||
product_types = list(spatial.get_selected_product_types())
|
||||
[
|
||||
ifc.run("control.unassign_control", relating_control=cost_item, related_object=product_type)
|
||||
for product_type in product_types
|
||||
]
|
||||
ifc.run("control.unassign_control", relating_control=cost_item, related_objects=product_types)
|
||||
cost.load_cost_item_types(cost_item)
|
||||
return product_types
|
||||
|
||||
@@ -213,7 +210,7 @@ def assign_cost_value(
|
||||
if existing_cost_rate is None:
|
||||
ifc.run("control.assign_control", relating_control=cost_rate, related_objects=[cost_item])
|
||||
else:
|
||||
ifc.run("control.unassign_control", relating_control=existing_cost_rate, related_object=cost_item)
|
||||
ifc.run("control.unassign_control", relating_control=existing_cost_rate, related_objects=[cost_item])
|
||||
ifc.run("control.assign_control", relating_control=cost_rate, related_objects=[cost_item])
|
||||
|
||||
|
||||
|
||||
@@ -433,7 +433,7 @@ def remove_task_calendar(
|
||||
task: ifcopenshell.entity_instance,
|
||||
work_calendar: ifcopenshell.entity_instance,
|
||||
) -> None:
|
||||
ifc.run("control.unassign_control", relating_control=work_calendar, related_object=task)
|
||||
ifc.run("control.unassign_control", relating_control=work_calendar, related_objects=[task])
|
||||
ifc.run("sequence.cascade_schedule", task=task)
|
||||
sequence.load_task_properties()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user