Fix bug where monetary unit causes import to fail

This commit is contained in:
Dion Moult
2020-05-14 16:29:56 +10:00
parent 5d7a841380
commit 32c621139b
@@ -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':