diff --git a/src/ifcblenderexport/blenderbim/bim/import_ifc.py b/src/ifcblenderexport/blenderbim/bim/import_ifc.py index d604125ceb..389496605e 100644 --- a/src/ifcblenderexport/blenderbim/bim/import_ifc.py +++ b/src/ifcblenderexport/blenderbim/bim/import_ifc.py @@ -529,7 +529,12 @@ class IfcImporter(): # 12D can have some funky coordinates out of any sensible range. This # method will not work all the time, but will catch most issues. offset_point = None - for point_list in self.file.by_type('IfcCartesianPointList3D'): + try: + point_lists = self.file.by_type('IfcCartesianPointList3D') + except: + # IFC2X3 does not have IfcCartesianPointList3D + point_lists = [] + for point_list in point_lists: coord_list = [None] * len(point_list.CoordList) for i, point in enumerate(point_list.CoordList): if len(point) == 2 or not self.is_point_far_away(point): diff --git a/src/ifcpatch/recipes/ResetAbsoluteCoordinates.py b/src/ifcpatch/recipes/ResetAbsoluteCoordinates.py index ae55dea468..ae8b674448 100644 --- a/src/ifcpatch/recipes/ResetAbsoluteCoordinates.py +++ b/src/ifcpatch/recipes/ResetAbsoluteCoordinates.py @@ -8,7 +8,12 @@ class Patcher: # 12D can have some funky coordinates out of any sensible range. This # method will not work all the time, but will catch most issues. offset_point = None - for point_list in self.file.by_type('IfcCartesianPointList3D'): + try: + point_lists = self.file.by_type('IfcCartesianPointList3D') + except: + # IFC2X3 does not have IfcCartesianPointList3D + point_lists = [] + for point_list in point_lists: coord_list = [None] * len(point_list.CoordList) for i, point in enumerate(point_list.CoordList): if len(point) == 2 or not self.is_point_far_away(point):