Scheduled dates now cascade when dependencies, lag times, and calendars are modified

This commit is contained in:
Dion Moult
2021-06-17 14:59:28 +10:00
parent 50608d9459
commit a08918fd22
7 changed files with 38 additions and 22 deletions
@@ -1,3 +1,4 @@
import ifcopenshell.api
import ifcopenshell.util.date
@@ -16,3 +17,5 @@ class Usecase:
else:
value = self.file.createIfcDuration(ifcopenshell.util.date.datetime2ifc(value, "IfcDuration"))
setattr(self.settings["lag_time"], name, value)
for rel in [r for r in self.file.get_inverse(self.settings["lag_time"]) if r.is_a("IfcRelSequence")]:
ifcopenshell.api.run("sequence.cascade_schedule", self.file, task=rel.RelatedProcess)