IFC selector now uses "class" as a keyword to get the IFC class to disambiguate between "type" and "class".

This commit is contained in:
Dion Moult
2023-03-27 21:47:11 +11:00
parent 1e77562f0f
commit c87911f00e
2 changed files with 8 additions and 1 deletions
@@ -23,6 +23,11 @@ import ifcopenshell.util.selector as subject
class TestGetElementValue(test.bootstrap.IFC4):
def test_selecting_an_elements_class_or_id_using_a_query(self):
element = ifcopenshell.api.run("root.create_entity", self.file, ifc_class="IfcWall")
assert subject.get_element_value(element, "class") == "IfcWall"
assert subject.get_element_value(element, "id") == element.id()
def test_selecting_an_elements_value_using_a_query(self):
element = ifcopenshell.api.run("root.create_entity", self.file, ifc_class="IfcWall")
element.Name = "Foobar"