Fix #2808. Bug where you couldn't assign element types in IFC4X3.

This commit is contained in:
Dion Moult
2023-02-26 11:25:39 +11:00
parent 96b2eaeae4
commit 6ce0deeb63
@@ -77,7 +77,7 @@ class IfcClassData:
declaration = tool.Ifc.schema().declaration_by_name(ifc_product)
declarations = ifcopenshell.util.schema.get_subtypes(declaration)
names = [d.name() for d in declarations]
if ifc_product == "IfcElementType":
if ifc_product == "IfcElementType" and tool.Ifc.get_schema() in ("IFC2X3", "IFC4"):
names.extend(("IfcDoorStyle", "IfcWindowStyle"))
version = tool.Ifc.get_schema()
return [(c, c, (get_entity_doc(version, c) or {}).get("description", "")) for c in sorted(names)]