You can now associate IFC elements with Brick elements and navigate to them

This commit is contained in:
Dion Moult
2021-11-17 13:27:07 +11:00
parent da6945b352
commit f9221717ff
12 changed files with 248 additions and 3 deletions
@@ -8,3 +8,11 @@ class TestAddReference(test.bootstrap.IFC4):
reference = ifcopenshell.api.run("library.add_reference", self.file, library=library)
assert reference.is_a("IfcLibraryReference")
assert reference.ReferencedLibrary == library
class TestAddReferenceIFC2X3(test.bootstrap.IFC2X3):
def test_adding_a_reference(self):
library = ifcopenshell.api.run("library.add_library", self.file, name="Name")
reference = ifcopenshell.api.run("library.add_reference", self.file, library=library)
assert reference.is_a("IfcLibraryReference")
assert library.LibraryReference == (reference,)