diff --git a/src/blenderbim/blenderbim/bim/module/model/data.py b/src/blenderbim/blenderbim/bim/module/model/data.py index e9373a9cde..92d37d2e28 100644 --- a/src/blenderbim/blenderbim/bim/module/model/data.py +++ b/src/blenderbim/blenderbim/bim/module/model/data.py @@ -68,7 +68,14 @@ class AuthoringData: declaration = tool.Ifc.schema().declaration_by_name("IfcElementType") declarations = ifcopenshell.util.schema.get_subtypes(declaration) names = [d.name() for d in declarations] - names.extend(("IfcDoorStyle", "IfcWindowStyle")) + + declaration = tool.Ifc.schema().declaration_by_name("IfcSpatialElementType") + declarations = ifcopenshell.util.schema.get_subtypes(declaration) + names.extend([d.name() for d in declarations]) + + if tool.Ifc.get_schema() in ("IFC2X3", "IFC4"): + names.extend(("IfcDoorStyle", "IfcWindowStyle")) + version = tool.Ifc.get_schema() return [(c, c, get_entity_doc(version, c).get("description", "")) for c in sorted(names)] diff --git a/src/blenderbim/blenderbim/bim/module/model/opening.py b/src/blenderbim/blenderbim/bim/module/model/opening.py index 51f06d1c40..af68690bf4 100644 --- a/src/blenderbim/blenderbim/bim/module/model/opening.py +++ b/src/blenderbim/blenderbim/bim/module/model/opening.py @@ -148,7 +148,7 @@ class FilledOpeningGenerator: def regenerate_from_type(self, usecase_path, ifc_file, settings): filling = settings["related_object"] - if not filling.FillsVoids: + if not getattr(filling, "FillsVoids", None): return opening = filling.FillsVoids[0].RelatingOpeningElement