control.assign_control to support batching

This commit is contained in:
Andrej730
2025-09-09 11:14:57 +05:00
parent fcb263f59a
commit abfb56350d
23 changed files with 104 additions and 50 deletions
@@ -95,7 +95,7 @@ class TestEditTaskTime(test.bootstrap.IFC4):
ifcopenshell.api.root.create_entity(self.file, ifc_class="IfcProject")
calendar = ifcopenshell.api.sequence.add_work_calendar(self.file)
task = self.file.createIfcTask()
ifcopenshell.api.control.assign_control(self.file, relating_control=calendar, related_object=task)
ifcopenshell.api.control.assign_control(self.file, relating_control=calendar, related_objects=[task])
task_time = ifcopenshell.api.sequence.add_task_time(self.file, task=task)
ifcopenshell.api.sequence.edit_task_time(
self.file,
@@ -195,7 +195,7 @@ class TestEditTaskTime(test.bootstrap.IFC4):
ifcopenshell.api.root.create_entity(self.file, ifc_class="IfcProject")
calendar = ifcopenshell.api.sequence.add_work_calendar(self.file)
task = self.file.createIfcTask()
ifcopenshell.api.control.assign_control(self.file, relating_control=calendar, related_object=task)
ifcopenshell.api.control.assign_control(self.file, relating_control=calendar, related_objects=[task])
task_time = ifcopenshell.api.sequence.add_task_time(self.file, task=task)
ifcopenshell.api.sequence.edit_task_time(
self.file,
@@ -38,7 +38,7 @@ class TestRemoveWorkCalendar(test.bootstrap.IFC4):
# Assign tasks.
task = ifcopenshell.api.sequence.add_task(self.file)
ifcopenshell.api.control.assign_control(self.file, work_calendar, task)
ifcopenshell.api.control.assign_control(self.file, work_calendar, [task])
ifcopenshell.api.sequence.remove_work_calendar(self.file, work_calendar)