A whole bunch of new usecases for managing IFC library information and references

This commit is contained in:
Dion Moult
2021-11-16 18:30:23 +11:00
parent 41486ba08a
commit 4617d9f234
16 changed files with 246 additions and 0 deletions
@@ -0,0 +1,12 @@
import test.bootstrap
import ifcopenshell.api
class TestRemoveReference(test.bootstrap.IFC4):
def test_removing_a_reference(self):
reference = self.file.createIfcLibraryReference()
product = self.file.createIfcWall()
ifcopenshell.api.run("library.assign_reference", self.file, product=product, reference=reference)
ifcopenshell.api.run("library.remove_reference", self.file, reference=reference)
assert len(self.file.by_type("IfcLibraryReference")) == 0
assert len(self.file.by_type("IfcRelAssociatesLibrary")) == 0