diff --git a/src/blenderbim/blenderbim/bim/module/cost/ui.py b/src/blenderbim/blenderbim/bim/module/cost/ui.py index a2a0a0d3c8..8f47ecd85e 100644 --- a/src/blenderbim/blenderbim/bim/module/cost/ui.py +++ b/src/blenderbim/blenderbim/bim/module/cost/ui.py @@ -13,7 +13,8 @@ class BIM_PT_cost_schedules(Panel): @classmethod def poll(cls, context): - return IfcStore.get_file() + file = IfcStore.get_file() + return file and hasattr(file, "schema") and file.schema != "IFC2X3" def draw(self, context): self.props = context.scene.BIMCostProperties diff --git a/src/blenderbim/blenderbim/bim/module/resource/ui.py b/src/blenderbim/blenderbim/bim/module/resource/ui.py index 1544d3fd39..f3619ed2de 100644 --- a/src/blenderbim/blenderbim/bim/module/resource/ui.py +++ b/src/blenderbim/blenderbim/bim/module/resource/ui.py @@ -13,7 +13,8 @@ class BIM_PT_resources(Panel): @classmethod def poll(cls, context): - return IfcStore.get_file() + file = IfcStore.get_file() + return file and hasattr(file, "schema") and file.schema != "IFC2X3" def draw(self, context): self.props = context.scene.BIMResourceProperties diff --git a/src/blenderbim/blenderbim/bim/module/sequence/ui.py b/src/blenderbim/blenderbim/bim/module/sequence/ui.py index 529d48bd9e..8a0c94da3f 100644 --- a/src/blenderbim/blenderbim/bim/module/sequence/ui.py +++ b/src/blenderbim/blenderbim/bim/module/sequence/ui.py @@ -17,7 +17,8 @@ class BIM_PT_work_plans(Panel): @classmethod def poll(cls, context): - return IfcStore.get_file() + file = IfcStore.get_file() + return file and hasattr(file, "schema") and file.schema != "IFC2X3" def draw(self, context): if not Data.is_loaded: @@ -88,7 +89,8 @@ class BIM_PT_work_schedules(Panel): @classmethod def poll(cls, context): - return IfcStore.get_file() + file = IfcStore.get_file() + return file and hasattr(file, "schema") and file.schema != "IFC2X3" def draw(self, context): self.props = context.scene.BIMWorkScheduleProperties @@ -429,7 +431,8 @@ class BIM_PT_work_calendars(Panel): @classmethod def poll(cls, context): - return IfcStore.get_file() + file = IfcStore.get_file() + return file and hasattr(file, "schema") and file.schema != "IFC2X3" def draw(self, context): if not Data.is_loaded: diff --git a/src/blenderbim/blenderbim/bim/module/structural/ui.py b/src/blenderbim/blenderbim/bim/module/structural/ui.py index 295cd0f1c5..5ce31355b8 100644 --- a/src/blenderbim/blenderbim/bim/module/structural/ui.py +++ b/src/blenderbim/blenderbim/bim/module/structural/ui.py @@ -261,7 +261,8 @@ class BIM_PT_structural_analysis_models(Panel): @classmethod def poll(cls, context): - return IfcStore.get_file() + file = IfcStore.get_file() + return file and hasattr(file, "schema") and file.schema != "IFC2X3" def draw(self, context): if not Data.is_loaded: @@ -345,7 +346,8 @@ class BIM_PT_structural_load_cases(Panel): @classmethod def poll(cls, context): - return IfcStore.get_file() + file = IfcStore.get_file() + return file and hasattr(file, "schema") and file.schema != "IFC2X3" def draw(self, context): self.props = context.scene.BIMStructuralProperties @@ -449,7 +451,8 @@ class BIM_PT_structural_loads(Panel): @classmethod def poll(cls, context): - return IfcStore.get_file() + file = IfcStore.get_file() + return file and hasattr(file, "schema") and file.schema != "IFC2X3" def draw(self, context): if not Data.is_loaded: @@ -516,7 +519,8 @@ class BIM_PT_boundary_conditions(Panel): @classmethod def poll(cls, context): - return IfcStore.get_file() + file = IfcStore.get_file() + return file and hasattr(file, "schema") and file.schema != "IFC2X3" def draw(self, context): if not Data.is_loaded: