From 1d7865c55843d0381d59129354925eeb2c2ab418 Mon Sep 17 00:00:00 2001 From: Dion Moult Date: Mon, 11 May 2020 15:17:39 +1000 Subject: [PATCH] Add support for IfcAnnotation elements --- src/ifcblenderexport/blenderbim/bim/prop.py | 10 ++++++++-- src/ifcblenderexport/blenderbim/bim/schema.py | 3 ++- src/ifcblenderexport/getIfcElements.py | 3 ++- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/ifcblenderexport/blenderbim/bim/prop.py b/src/ifcblenderexport/blenderbim/bim/prop.py index e660e9a764..521f076907 100644 --- a/src/ifcblenderexport/blenderbim/bim/prop.py +++ b/src/ifcblenderexport/blenderbim/bim/prop.py @@ -124,8 +124,14 @@ def refreshBoundaryConditionAttributes(self, context): def getIfcProducts(self, context): global products_enum if len(products_enum) < 1: - products_enum.extend([(e, e, '') for e in - ['IfcElement', 'IfcElementType', 'IfcSpatialElement', 'IfcGroup', 'IfcStructural', 'IfcContext']]) + products_enum.extend([(e, e, '') for e in [ + 'IfcElement', + 'IfcElementType', + 'IfcSpatialElement', + 'IfcGroup', + 'IfcStructural', + 'IfcContext', + 'IfcAnnotation']]) return products_enum diff --git a/src/ifcblenderexport/blenderbim/bim/schema.py b/src/ifcblenderexport/blenderbim/bim/schema.py index 4eeafed537..4e40b0488d 100644 --- a/src/ifcblenderexport/blenderbim/bim/schema.py +++ b/src/ifcblenderexport/blenderbim/bim/schema.py @@ -20,7 +20,8 @@ class IfcSchema(): 'IfcMaterialDefinition', 'IfcParameterizedProfileDef', 'IfcBoundaryCondition', - 'IfcElementType' + 'IfcElementType', + 'IfcAnnotation' ] self.elements = {} diff --git a/src/ifcblenderexport/getIfcElements.py b/src/ifcblenderexport/getIfcElements.py index 8faad58296..1ff143605d 100644 --- a/src/ifcblenderexport/getIfcElements.py +++ b/src/ifcblenderexport/getIfcElements.py @@ -156,7 +156,8 @@ filename_filters = { 'IfcMaterialDefinition_IFC4.json': ['IfcMaterialDefinition'], 'IfcParameterizedProfileDef_IFC4.json': ['IfcParameterizedProfileDef'], 'IfcBoundaryCondition_IFC4.json': ['IfcBoundaryCondition'], - 'IfcElementType_IFC4.json': ['IfcElementType'] + 'IfcElementType_IFC4.json': ['IfcElementType'], + 'IfcAnnotation_IFC4.json': ['IfcAnnotation'] } for filename, filters in filename_filters.items():