diff --git a/src/ifcblenderexport/blenderbim/bim/import_ifc.py b/src/ifcblenderexport/blenderbim/bim/import_ifc.py index de77317bbc..d4f75bbfbb 100644 --- a/src/ifcblenderexport/blenderbim/bim/import_ifc.py +++ b/src/ifcblenderexport/blenderbim/bim/import_ifc.py @@ -635,10 +635,16 @@ class IfcImporter(): if not element.Representation: return for r in element.Representation.Representations: - subcontexts.append('{}/{}/{}'.format( - r.ContextOfItems.ContextType, - r.ContextOfItems.ContextIdentifier, - r.ContextOfItems.TargetView)) + if r.ContextOfItems.is_a('IfcGeometricRepresentationSubContext'): + subcontexts.append('{}/{}/{}'.format( + r.ContextOfItems.ContextType, + r.ContextOfItems.ContextIdentifier, + r.ContextOfItems.TargetView)) + else: + subcontexts.append('{}/{}/{}'.format( + r.ContextOfItems.ContextType, + r.ContextOfItems.ContextIdentifier, + None)) elif element.is_a('IfcTypeProduct'): if not element.RepresentationMaps: return