New add application usecase, improved add_classification usecase and better defaults for owner settings. Thanks johltn

This commit is contained in:
Dion Moult
2021-07-02 16:30:30 +10:00
parent 30f778e0a7
commit b4a422c2b8
3 changed files with 28 additions and 10 deletions
@@ -0,0 +1,9 @@
class Usecase:
def __init__(self, file, **settings):
self.file = file
self.settings = {"attributes": None}
for key, value in settings.items():
self.settings[key] = value
def execute(self):
return self.file.create_entity("IfcApplication", **self.settings["attributes"])
@@ -1,10 +1,13 @@
# Note: it is the intent for you to override these with your own functions
def get_person(ifc):
pass
return ifc.by_type("IfcPerson")[0]
def get_organisation(ifc):
pass
return ifc.by_type("IfcOrganization")[0]
def get_application(ifc):
pass
return ifc.by_type("IfcApplication")[0]