mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-13 02:47:48 +00:00
Fix bug where monetary unit causes import to fail
This commit is contained in:
@@ -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':
|
||||
|
||||
Reference in New Issue
Block a user