You can now add and edit context dependent units including dimensional exponents

This commit is contained in:
Dion Moult
2021-08-16 15:58:44 +10:00
parent 6ee0027f33
commit 6b7b81765c
6 changed files with 76 additions and 12 deletions
@@ -0,0 +1,14 @@
class Usecase:
def __init__(self, file, **settings):
self.file = file
self.settings = {"unit_type": "USERDEFINED", "name": "THINGAMAJIG", "dimensions": (0, 0, 0, 0, 0, 0, 0)}
for key, value in settings.items():
self.settings[key] = value
def execute(self):
return self.file.create_entity(
"IfcContextDependentUnit",
Dimensions=self.file.createIfcDimensionalExponents(*self.settings["dimensions"]),
UnitType=self.settings["unit_type"],
Name=self.settings["name"],
)