Files
IfcOpenShell/src/ifcblenderexport/blenderbim/bim/module/unit/data.py
T

20 lines
446 B
Python

from blenderbim.bim.ifc import IfcStore
class Data:
is_loaded = False
units = {}
@classmethod
def load(cls):
file = IfcStore.get_file()
if not file:
return
unit_assignment = file.by_type("IfcUnitAssignment")
if not unit_assignment:
return
for unit in unit_assignment[0].Units:
pass
# TODO: implement along with UI
cls.is_loaded = True