From 8bb4ab91b83ea7349379d59fae12fed3fd3a17f2 Mon Sep 17 00:00:00 2001 From: Andrej730 Date: Wed, 24 May 2023 18:02:53 +0500 Subject: [PATCH] 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. --- src/ifccsv/ifccsv.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ifccsv/ifccsv.py b/src/ifccsv/ifccsv.py index 8fc4adb5a1..e415f4bad2 100755 --- a/src/ifccsv/ifccsv.py +++ b/src/ifccsv/ifccsv.py @@ -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)