mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-18 03:19:53 +00:00
Refactor ownership history system to be simpler and just a usecase. See #1399.
This commit is contained in:
@@ -1,6 +1,13 @@
|
||||
class Usecase:
|
||||
def __init__(self, file):
|
||||
def __init__(self, file, settings={}):
|
||||
self.file = file
|
||||
self.settings = {
|
||||
"Identification": "HSeldon",
|
||||
"FamilyName": "Seldon",
|
||||
"GivenName": "Hari",
|
||||
}
|
||||
for key, value in settings.items():
|
||||
self.settings[key] = value
|
||||
|
||||
def execute(self):
|
||||
self.file.createIfcPerson("HSeldon", "Seldon", "Hari")
|
||||
return self.file.create_entity("IfcPerson", **self.settings)
|
||||
|
||||
Reference in New Issue
Block a user