diff --git a/src/blenderbim/blenderbim/bim/module/system/data.py b/src/blenderbim/blenderbim/bim/module/system/data.py index 6955fcdbbf..48f7e88471 100644 --- a/src/blenderbim/blenderbim/bim/module/system/data.py +++ b/src/blenderbim/blenderbim/bim/module/system/data.py @@ -47,6 +47,9 @@ class SystemData: declaration = tool.Ifc.schema().declaration_by_name("IfcSystem") declarations = ifcopenshell.util.schema.get_subtypes(declaration) version = tool.Ifc.get_schema() + if version == "IFC2X3": + declarations += [tool.Ifc.schema().declaration_by_name("IfcZone")] + # We're only interested in systems for services. Not sure why IFC groups these together. return [ (c, c, get_entity_doc(version, c).get("description", "")) @@ -56,7 +59,7 @@ class SystemData: @classmethod def total_systems(cls): - return len(tool.Ifc.get().by_type("IfcSystem")) + return len(tool.System.get_systems()) class ObjectSystemData: @@ -85,7 +88,7 @@ class ObjectSystemData: @classmethod def total_systems(cls): - return len(tool.Ifc.get().by_type("IfcSystem")) + return len(tool.System.get_systems()) @classmethod def connected_elements(cls): diff --git a/src/blenderbim/blenderbim/tool/system.py b/src/blenderbim/blenderbim/tool/system.py index be09c808d5..47e1f58672 100644 --- a/src/blenderbim/blenderbim/tool/system.py +++ b/src/blenderbim/blenderbim/tool/system.py @@ -127,11 +127,17 @@ class System(blenderbim.core.tool.System): props.system_attributes.clear() blenderbim.bim.helper.import_attributes2(system, props.system_attributes) + @classmethod + def get_systems(cls): + if tool.Ifc.get_schema() == "IFC2X3": + return tool.Ifc.get().by_type("IfcSystem") + tool.Ifc.get().by_type("IfcZone") + return tool.Ifc.get().by_type("IfcSystem") + @classmethod def import_systems(cls): props = bpy.context.scene.BIMSystemProperties props.systems.clear() - for system in tool.Ifc.get().by_type("IfcSystem"): + for system in cls.get_systems(): if system.is_a() in ["IfcStructuralAnalysisModel"]: continue new = props.systems.add()