From 908bf02098a73f81af5111d0cb79738f1b1988cd Mon Sep 17 00:00:00 2001 From: Andrej730 Date: Mon, 21 Apr 2025 16:59:30 +0500 Subject: [PATCH] ifc5d - strip " Cost" suffix when importing csv " Cost" is a suffix is added on export, so it makes to get rid of it on import. --- src/ifc5d/ifc5d/csv2ifc.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/ifc5d/ifc5d/csv2ifc.py b/src/ifc5d/ifc5d/csv2ifc.py index 2be67791ae..877f18c660 100644 --- a/src/ifc5d/ifc5d/csv2ifc.py +++ b/src/ifc5d/ifc5d/csv2ifc.py @@ -157,7 +157,10 @@ class Csv2Ifc: else: # Very fragile part of the code. self.categories = { # pyright: ignore [reportAttributeAccessIssue] - name: index for name, index in self.headers.items() if name not in MAIN_CSV_HEADER_COLUMNS + # ' Cost' is a sufix added on export. + name.removesuffix(" Cost"): index + for name, index in self.headers.items() + if name not in MAIN_CSV_HEADER_COLUMNS } if self.categories: print(