mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 09:48:32 +00:00
project.assign_declaration - support batching #4474
This commit is contained in:
@@ -61,7 +61,7 @@ class Usecase:
|
||||
root = ifcopenshell.api.run("root.create_entity", library, ifc_class="IfcProject", name="Demo Library")
|
||||
context = ifcopenshell.api.run("root.create_entity", library,
|
||||
ifc_class="IfcProjectLibrary", name="Demo Library")
|
||||
ifcopenshell.api.run("project.assign_declaration", library, definition=context, relating_context=root)
|
||||
ifcopenshell.api.run("project.assign_declaration", library, definitions=[context], relating_context=root)
|
||||
|
||||
# Assign units for our example library
|
||||
unit = ifcopenshell.api.run("unit.add_si_unit", library,
|
||||
@@ -80,7 +80,7 @@ class Usecase:
|
||||
|
||||
# Mark our wall type as a reusable asset in our library.
|
||||
ifcopenshell.api.run("project.assign_declaration", library,
|
||||
definition=wall_type, relating_context=context)
|
||||
definitions=[wall_type], relating_context=context)
|
||||
|
||||
# Let's imagine we're starting a new project
|
||||
model = ifcopenshell.api.run("project.create_file")
|
||||
|
||||
Reference in New Issue
Block a user