mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-19 06:39:13 +00:00
Annotations are now auto collected correctly and simpler drawings UI. See #1153.
This commit is contained in:
@@ -221,6 +221,20 @@ class TestAssign(NewFile):
|
||||
element = tool.Ifc.get().createIfcAnnotation(ObjectType="DRAWING")
|
||||
tool.Ifc.link(element, element_obj)
|
||||
group = ifcopenshell.api.run("group.add_group", tool.Ifc.get())
|
||||
group.ObjectType = "DRAWING"
|
||||
ifcopenshell.api.run("group.assign_group", tool.Ifc.get(), product=element, group=group)
|
||||
subject.assign(element_obj)
|
||||
assert element_obj.users_collection[0].name == "IfcGroup/Unnamed"
|
||||
assert bpy.data.collections.get("Views").children.get("IfcGroup/Unnamed")
|
||||
assert bpy.data.collections.get("IfcProject/My Project").children.get("Views")
|
||||
|
||||
def test_in_decomposition_mode_annotations_are_placed_in_a_group_in_a_views_collection(self):
|
||||
bpy.ops.bim.create_project()
|
||||
element_obj = bpy.data.objects.new("IfcAnnotation/Name", None)
|
||||
element = tool.Ifc.get().createIfcAnnotation()
|
||||
tool.Ifc.link(element, element_obj)
|
||||
group = ifcopenshell.api.run("group.add_group", tool.Ifc.get())
|
||||
group.ObjectType = "DRAWING"
|
||||
ifcopenshell.api.run("group.assign_group", tool.Ifc.get(), product=element, group=group)
|
||||
subject.assign(element_obj)
|
||||
assert element_obj.users_collection[0].name == "IfcGroup/Unnamed"
|
||||
|
||||
Reference in New Issue
Block a user