Implement ability to add SI units

This commit is contained in:
Dion Moult
2021-08-13 16:18:05 +10:00
parent 671f1ab9cf
commit fd163a3d1e
6 changed files with 99 additions and 19 deletions
@@ -0,0 +1,9 @@
class Usecase:
def __init__(self, file, **settings):
self.file = file
self.settings = {"unit_type": "LENGTHUNIT", "name": "METRE"}
for key, value in settings.items():
self.settings[key] = value
def execute(self):
return self.file.create_entity("IfcSIUnit", UnitType=self.settings["unit_type"], Name=self.settings["name"])