fix root.create_entity skipping setting up defaults on ifc4x3

This commit is contained in:
Andrej730
2024-05-21 17:19:33 +05:00
parent 295d0a677e
commit 9b562669d2
@@ -105,7 +105,7 @@ class Usecase:
element.ObjectType = self.settings["predefined_type"]
if self.file.schema == "IFC2X3":
self.handle_2x3_defaults(element)
elif self.file.schema == "IFC4":
else:
self.handle_4_defaults(element)
return element
@@ -131,7 +131,7 @@ class Usecase:
if hasattr(element, "PredefinedType") and not element.PredefinedType:
element.PredefinedType = "NOTDEFINED"
if element.is_a("IfcDoorStyle") or element.is_a("IfcWindowStyle"):
if element.file.schema == "IFC4" and (element.is_a("IfcDoorStyle") or element.is_a("IfcWindowStyle")):
element.OperationType = "NOTDEFINED"
element.ConstructionType = "NOTDEFINED"
element.ParameterTakesPrecedence = False