Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error saving when there's a linked IFC file #4081

Closed
theoryshaw opened this issue Dec 6, 2023 · 4 comments
Closed

Error saving when there's a linked IFC file #4081

theoryshaw opened this issue Dec 6, 2023 · 4 comments
Assignees

Comments

@theoryshaw
Copy link
Member

I get the following error after limit dissolving an object.
I think it has something to do with the linked ifc.

Open the Restaurant_Sun_Prairie.blend file first.

files: https://www.dropbox.com/scl/fo/p2grb14lr4krtpei4lgbr/h?rlkey=utcrl6cx40azi7qjq1ghpnrq9&dl=1

2023-12-05_20-47-50_Blender_.DDropboxTroubleshooting20231205_-_error_o_blender.mp4
Python: Traceback (most recent call last):
  File "C:\Users\Owner\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\blenderbim\bim\module\project\operator.py", line 1041, in invoke
    return self.execute(context)
  File "C:\Users\Owner\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\blenderbim\bim\module\project\operator.py", line 1062, in execute
    IfcStore.execute_ifc_operator(self, context)
  File "C:\Users\Owner\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\blenderbim\bim\ifc.py", line 336, in execute_ifc_operator
    result = getattr(operator, "_execute")(context)
  File "C:\Users\Owner\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\blenderbim\bim\module\project\operator.py", line 1094, in _execute
    ifc_exporter.export()
  File "C:\Users\Owner\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\blenderbim\bim\export_ifc.py", line 47, in export
    self.sync_all_objects()
  File "C:\Users\Owner\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\blenderbim\bim\export_ifc.py", line 98, in sync_all_objects
    tool.Collector.sync(obj)
  File "C:\Users\Owner\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\blenderbim\tool\collector.py", line 79, in sync
    blenderbim.core.aggregate.assign_object(
  File "C:\Users\Owner\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\blenderbim\core\aggregate.py", line 34, in assign_object
    collector.assign(relating_obj)
  File "C:\Users\Owner\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\blenderbim\tool\collector.py", line 108, in assign
    collection_collection.children.link(object_collection)
RuntimeError: Error: Could not (un)link the collection 'IfcSite/Revit_Import' because the collection 'IfcProject/My Project' is linked

@theoryshaw
Copy link
Member Author

Here's a few simpler test files.

open 20231205 - error on save with ifc links - simple.blend first.

files: https://www.dropbox.com/scl/fo/6fz6g6cyiejk2886bra4h/h?rlkey=e9a6qmtdh2nre43cotl0yhs5b&dl=1

2023-12-05_21-09-34_Blender_.DDropboxTroubleshooting20231205_-_error_o_blender.mp4

@theoryshaw
Copy link
Member Author

We still get the same error with when we link the .blend file via this way, as well.

image

Andrej730 added a commit that referenced this issue Dec 8, 2023
In #4081 reported the case when during redo (changing param in operator's popup) `Ifc.rebuild_element_maps` was relinking elements without discarding possible linked blender libraries. It end up accidentally linking some library's objects to the current Ifc file leading to errors.

Also fixed possible similar issue in couple other places.
@Andrej730
Copy link
Contributor

Surprised we've got this far without meeting this one, fixed.
Basically it was accidentally linking object's from linked .blend file to the current .ifc file leading to those kind of issues.

@Andrej730 Andrej730 self-assigned this Dec 8, 2023
@theoryshaw
Copy link
Member Author

Surprised we've got this far without meeting this one, fixed.

yes, me too. Thanks @Andrej730

aothms pushed a commit that referenced this issue Apr 18, 2024
In #4081 reported the case when during redo (changing param in operator's popup) `Ifc.rebuild_element_maps` was relinking elements without discarding possible linked blender libraries. It end up accidentally linking some library's objects to the current Ifc file leading to errors.

Also fixed possible similar issue in couple other places.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

2 participants