mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-24 21:00:01 +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):
|
def set_units(self):
|
||||||
units = self.file.by_type('IfcUnitAssignment')[0]
|
units = self.file.by_type('IfcUnitAssignment')[0]
|
||||||
for unit in units.Units:
|
for unit in units.Units:
|
||||||
if unit.UnitType == 'LENGTHUNIT':
|
if unit.is_a('IfcNamedUnit') and unit.UnitType == 'LENGTHUNIT':
|
||||||
if unit.is_a('IfcSIUnit'):
|
if unit.is_a('IfcSIUnit'):
|
||||||
bpy.context.scene.unit_settings.system = 'METRIC'
|
bpy.context.scene.unit_settings.system = 'METRIC'
|
||||||
if unit.Name == 'METRE':
|
if unit.Name == 'METRE':
|
||||||
|
|||||||
Reference in New Issue
Block a user