diff --git a/src/ifccsv/ifccsv.py b/src/ifccsv/ifccsv.py index c6707ca28c..58bdff945a 100755 --- a/src/ifccsv/ifccsv.py +++ b/src/ifccsv/ifccsv.py @@ -489,6 +489,9 @@ class IfcCsv: bool_false: str, concat: str, ) -> None: + # Read-only attributes that should be skipped during import + READ_ONLY_ATTRIBUTES = {'count'} + try: element = ifc_file.by_guid(row[0]) except: @@ -506,6 +509,11 @@ class IfcCsv: elif value == bool_false: value = False key = attributes[i] or headers[i] + + # Skip read-only attributes + if key.lower() in READ_ONLY_ATTRIBUTES: + continue + ifcopenshell.util.selector.set_element_value(ifc_file, element, key, value, concat=concat)