ifcopenshell.api modules Persons and Organisations account for IFC4 SCHEMA CHANGE (#1417)

This commit is contained in:
Sigma Dimensions
2021-04-06 23:28:02 +01:00
committed by GitHub
parent 8edced5a0c
commit 23be1a6939
2 changed files with 8 additions and 2 deletions
@@ -9,4 +9,7 @@ class Usecase:
self.settings[key] = value
def execute(self):
return self.file.create_entity("IfcOrganization", **self.settings)
if self.file.schema == "IFC2X3":
self.settings["Id"] = self.settings["Identification"]
del self.settings["Identification"]
return self.file.create_entity("IfcOrganization", **self.settings)
@@ -10,4 +10,7 @@ class Usecase:
self.settings[key] = value
def execute(self):
return self.file.create_entity("IfcPerson", **self.settings)
if self.file.schema == "IFC2X3":
self.settings["Id"] = self.settings["Identification"]
del self.settings["Identification"]
return self.file.create_entity("IfcPerson", **self.settings)