From ddfe0e0c98b953464ac82549e65eec9a03dd52c2 Mon Sep 17 00:00:00 2001 From: Dion Moult Date: Sat, 14 Nov 2020 10:11:36 +1100 Subject: [PATCH] IFCCSV will now skip GUIDS that it cannot find --- src/ifccsv/ifccsv.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/ifccsv/ifccsv.py b/src/ifccsv/ifccsv.py index 538248a44d..d2db9ce936 100755 --- a/src/ifccsv/ifccsv.py +++ b/src/ifccsv/ifccsv.py @@ -157,8 +157,10 @@ class IfcCsv: if not headers: headers = row continue - element = ifc_file.by_guid(row[0]) - if not element: + try: + element = ifc_file.by_guid(row[0]) + except: + print("The element with GUID {} was not found".format(row[0])) continue for i, value in enumerate(row): if i == 0: