project.unassign_declaration - support batching #4474

This commit is contained in:
Andrej730
2024-05-03 14:58:32 +05:00
parent de690a385c
commit ac29e152bb
10 changed files with 138 additions and 25 deletions
@@ -57,7 +57,7 @@ class Usecase:
ifcopenshell.api.run(
"project.unassign_declaration",
self.file,
definition=self.settings["work_schedule"],
definitions=[self.settings["work_schedule"]],
relating_context=self.file.by_type("IfcContext")[0],
)
rel_aggregates = ifcopenshell.api.run(
@@ -62,7 +62,7 @@ class Usecase:
ifcopenshell.api.run(
"project.unassign_declaration",
self.file,
definition=self.settings["task"],
definitions=[self.settings["task"]],
relating_context=self.file.by_type("IfcContext")[0],
)
if self.settings["task"].TaskTime:
@@ -50,7 +50,7 @@ class Usecase:
ifcopenshell.api.run(
"project.unassign_declaration",
self.file,
definition=self.settings["work_calendar"],
definitions=[self.settings["work_calendar"]],
relating_context=self.file.by_type("IfcContext")[0],
)
if self.settings["work_calendar"].Controls:
@@ -50,7 +50,7 @@ class Usecase:
ifcopenshell.api.run(
"project.unassign_declaration",
self.file,
definition=self.settings["work_plan"],
definitions=[self.settings["work_plan"]],
relating_context=self.file.by_type("IfcContext")[0],
)
history = self.settings["work_plan"].OwnerHistory
@@ -54,7 +54,7 @@ class Usecase:
ifcopenshell.api.run(
"project.unassign_declaration",
self.file,
definition=self.settings["work_schedule"],
definitions=[self.settings["work_schedule"]],
relating_context=self.file.by_type("IfcContext")[0],
)
if self.settings["work_schedule"].Declares: