From b5b8b5df2660bad19d24958edfe7cb64069caf87 Mon Sep 17 00:00:00 2001 From: "Sigma Dimensions (Yass)" <79010126+myoualid@users.noreply.github.com> Date: Wed, 20 Sep 2023 01:15:06 +0100 Subject: [PATCH] cascade schedule when adding a sequence relationship --- .../ifcopenshell/api/sequence/assign_sequence.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/ifcopenshell-python/ifcopenshell/api/sequence/assign_sequence.py b/src/ifcopenshell-python/ifcopenshell/api/sequence/assign_sequence.py index a3b4dd2a16..078f5b7f5c 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/sequence/assign_sequence.py +++ b/src/ifcopenshell-python/ifcopenshell/api/sequence/assign_sequence.py @@ -120,7 +120,7 @@ class Usecase: for rel in self.settings["related_process"].IsSuccessorFrom or []: if rel.RelatingProcess == self.settings["relating_process"]: return rel - return self.file.create_entity( + rel = self.file.create_entity( "IfcRelSequence", **{ "GlobalId": ifcopenshell.guid.new(), @@ -132,3 +132,7 @@ class Usecase: "SequenceType": self.settings["sequence_type"], } ) + ifcopenshell.api.run( + "sequence.cascade_schedule", self.file, task=self.settings["relating_process"] + ) + return rel