From 32c621139b68c5f5980615abcfa515d6663cd9e1 Mon Sep 17 00:00:00 2001 From: Dion Moult Date: Thu, 14 May 2020 16:29:56 +1000 Subject: [PATCH] Fix bug where monetary unit causes import to fail --- src/ifcblenderexport/blenderbim/bim/import_ifc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ifcblenderexport/blenderbim/bim/import_ifc.py b/src/ifcblenderexport/blenderbim/bim/import_ifc.py index 4d23ee2d4a..de77317bbc 100644 --- a/src/ifcblenderexport/blenderbim/bim/import_ifc.py +++ b/src/ifcblenderexport/blenderbim/bim/import_ifc.py @@ -773,7 +773,7 @@ class IfcImporter(): def set_units(self): units = self.file.by_type('IfcUnitAssignment')[0] for unit in units.Units: - if unit.UnitType == 'LENGTHUNIT': + if unit.is_a('IfcNamedUnit') and unit.UnitType == 'LENGTHUNIT': if unit.is_a('IfcSIUnit'): bpy.context.scene.unit_settings.system = 'METRIC' if unit.Name == 'METRE':