Was getting this error at project start:

Traceback (most recent call last):
  File "\scripts\addons\blenderbim\bim\module\project\operator.py", line 332, in execute
    return IfcStore.execute_ifc_operator(self, context)
  File "\scripts\addons\blenderbim\bim\ifc.py", line 410, in execute_ifc_operator
    result = getattr(operator, "_execute")(context)
  File "\scripts\addons\blenderbim\bim\module\project\operator.py", line 345, in _execute
    self.import_type_from_ifc(element, context)
  File "\scripts\addons\blenderbim\bim\module\project\operator.py", line 374, in import_type_from_ifc
    collection_obj = collection.BIMCollectionProperties.obj
AttributeError: 'LayerCollection' object has no attribute 'BIMCollectionProperties'
This commit is contained in:
Andrej730
2023-06-05 11:50:27 +05:00
parent 01635ecd8a
commit 7976fb4d09
@@ -371,7 +371,7 @@ class AppendLibraryElement(bpy.types.Operator):
if not type_collection:
type_collection = bpy.data.collections.new("Types")
for collection in bpy.context.view_layer.layer_collection.children:
collection_obj = collection.BIMCollectionProperties.obj
collection_obj = collection.collection.BIMCollectionProperties.obj
if collection_obj and tool.Ifc.get_entity(collection_obj).is_a("IfcProject"):
collection.collection.children.link(type_collection)
collection.children["Types"].hide_viewport = True