Fix #4305. Bug where importing spreadsheets into IFC didn't intelligently cast attribute data types

This commit is contained in:
Dion Moult
2024-03-29 20:37:22 +11:00
parent 19c8afb652
commit 8d7b293381
2 changed files with 31 additions and 1 deletions
@@ -292,6 +292,13 @@ class TestSetElementValue(test.bootstrap.IFC4):
ifcopenshell.util.placement.get_local_placement(element_without_placement.ObjectPlacement), matrix
)
def test_set_attribute(self):
element = self.file.createIfcWall()
subject.set_element_value(self.file, element, "Name", "Foo")
assert element.Name == "Foo"
subject.set_element_value(self.file, element, "Name", 123)
assert element.Name == "123"
class TestSelector(test.bootstrap.IFC4):
def test_selecting_from_specified_elements(self):