mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-11 22:31:55 +00:00
type.assign_type - support batching #4474
This commit is contained in:
@@ -199,7 +199,7 @@ class TestGetElementType(NewFile):
|
||||
ifc = tool.Ifc.get()
|
||||
element = ifc.createIfcWall()
|
||||
type = ifc.createIfcWallType()
|
||||
ifcopenshell.api.run("type.assign_type", ifc, related_object=element, relating_type=type)
|
||||
ifcopenshell.api.run("type.assign_type", ifc, related_objects=[element], relating_type=type)
|
||||
assert subject.get_element_type(element) == type
|
||||
|
||||
|
||||
@@ -209,7 +209,7 @@ class TestGetElementsOfType(NewFile):
|
||||
ifc = tool.Ifc.get()
|
||||
element = ifc.createIfcWall()
|
||||
type = ifc.createIfcWallType()
|
||||
ifcopenshell.api.run("type.assign_type", ifc, related_object=element, relating_type=type)
|
||||
ifcopenshell.api.run("type.assign_type", ifc, related_objects=[element], relating_type=type)
|
||||
assert subject.get_elements_of_type(type) == (element,)
|
||||
|
||||
|
||||
|
||||
@@ -98,7 +98,7 @@ class TestGetElementType(NewFile):
|
||||
ifc = tool.Ifc.get()
|
||||
element = ifc.createIfcWall()
|
||||
type = ifc.createIfcWallType()
|
||||
ifcopenshell.api.run("type.assign_type", ifc, related_object=element, relating_type=type)
|
||||
ifcopenshell.api.run("type.assign_type", ifc, related_objects=[element], relating_type=type)
|
||||
assert subject.get_element_type(element) == type
|
||||
|
||||
|
||||
|
||||
@@ -154,7 +154,7 @@ class TestGetTypeOccurrences(NewFile):
|
||||
tool.Ifc.set(ifc)
|
||||
wall_type = ifcopenshell.api.run("root.create_entity", ifc, ifc_class="IfcWallType")
|
||||
wall = ifcopenshell.api.run("root.create_entity", ifc, ifc_class="IfcWall")
|
||||
ifcopenshell.api.run("type.assign_type", ifc, related_object=wall, relating_type=wall_type)
|
||||
ifcopenshell.api.run("type.assign_type", ifc, related_objects=[wall], relating_type=wall_type)
|
||||
assert subject.get_type_occurrences(wall_type) == (wall,)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user