project.assign_declaration - support batching #4474

This commit is contained in:
Andrej730
2024-05-03 14:37:59 +05:00
parent a973b62918
commit de690a385c
19 changed files with 182 additions and 70 deletions
@@ -46,7 +46,7 @@ class Usecase:
ifc_class="IfcProjectLibrary", name="Demo Library")
# It's necessary to say our library is part of our project.
ifcopenshell.api.run("project.assign_declaration", library, definition=context, relating_context=root)
ifcopenshell.api.run("project.assign_declaration", library, definitions=[context], relating_context=root)
# Remove the library from our project
ifcopenshell.api.run("project.unassign_declaration", library, definition=context, relating_context=root)