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
+2 -1
View File
@@ -261,6 +261,7 @@ class ScheduleIfcGenerator:
wbs: Union[WBSEntry, None],
work_schedule: Union[ifcopenshell.entity_instance, None],
) -> None:
assert self.file
activity["ifc"] = ifcopenshell.api.sequence.add_task(
self.file,
work_schedule=None if wbs else work_schedule,
@@ -283,7 +284,7 @@ class ScheduleIfcGenerator:
ifcopenshell.api.control.assign_control(
self.file,
relating_control=calendar["ifc"],
related_object=activity["ifc"],
related_objects=[activity["ifc"]],
)
ifcopenshell.api.sequence.edit_task_time(
self.file,
+1 -1
View File
@@ -263,7 +263,7 @@ class MSP2Ifc:
ifcopenshell.api.control.assign_control(
self.file,
relating_control=calendar,
related_object=task["ifc"],
related_objects=[task["ifc"]],
)
ifcopenshell.api.sequence.edit_task(