Fixed problem with ifccsv set_element_key #3192

Currently "type" attribute in selector returns something like "#71=IfcWallType('20jY5HfLH4LBwMrDEoTdML',$,'WAL100',$,$,$,$,$,$,.NOTDEFINED.)" when the code was expecting the class name like "IfcSlab" or "IfcWall". Changed it to "class" atribute that returns just class name.
This commit is contained in:
Andrej730
2023-05-24 18:02:53 +05:00
parent 0cdd9a0cde
commit 8bb4ab91b8
+1 -1
View File
@@ -45,7 +45,7 @@ except:
class IfcAttributeSetter:
@staticmethod
def set_element_key(ifc_file, element, key, value):
if key == "type" and element.is_a() != value:
if key == "class" and element.is_a() != value:
return ifcopenshell.util.schema.reassign_class(ifc_file, element, value)
if hasattr(element, key):
setattr(element, key, value)