ifcopenshell.file.assign_header_from() to copy header

This commit is contained in:
Thomas Krijnen
2024-09-03 18:49:05 +02:00
parent bea837299e
commit eb7411b310
2 changed files with 27 additions and 0 deletions
@@ -279,3 +279,10 @@ class TestFile(test.bootstrap.IFC4):
element = self.file.createIfcWall()
g = ifcopenshell.file.from_string(self.file.wrapped_data.to_string())
assert g.by_id(1).is_a("IfcWall")
def test_assigning_header(self):
f = ifcopenshell.file(schema="IFC4")
f.header.file_name.name = "test"
g = ifcopenshell.file(schema="IFC4")
g.assign_header_from(f)
assert g.header.file_name.name == "test"