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 when refreshing linked aggregate #4435

Open
theoryshaw opened this issue Mar 16, 2024 · 4 comments
Open

Error when refreshing linked aggregate #4435

theoryshaw opened this issue Mar 16, 2024 · 4 comments

Comments

@theoryshaw
Copy link
Member

theoryshaw commented Mar 16, 2024

When i try to refresh the linked aggregates in the following file, it gives the following error.

file: https://hub.openingdesign.com/OpeningDesign/Highland_Haven/src/commit/9218e84934852facbca0120f71ffcba75d6be1f9/Open/Models_and_CAD/BlenderBIM/Highland_Haven.ifc

2024-03-15_21-50-20_blenderBlenderblender.mp4

Python: Traceback (most recent call last):
  File "C:\Users\Ryan Schultz\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\blenderbim\bim\module\geometry\operator.py", line 1103, in execute
    IfcStore.execute_ifc_operator(self, context)
  File "C:\Users\Ryan Schultz\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\blenderbim\bim\ifc.py", line 349, in execute_ifc_operator
    result = getattr(operator, "_execute")(context)
  File "C:\Users\Ryan Schultz\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\blenderbim\bim\module\geometry\operator.py", line 1267, in _execute
    original_names = get_original_names(element)
  File "C:\Users\Ryan Schultz\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\blenderbim\bim\module\geometry\operator.py", line 1137, in get_original_names
    index = pset['Index']                    
TypeError: 'NoneType' object is not subscriptable


ping @brunoperdigao

@brunoperdigao
Copy link
Contributor

@theoryshaw Please try running this script and test again to see if the issue is solved: https://gist.github.com/brunoperdigao/6b0f0d255a9d4eebd8faf9b8f778329d

The problem is that one of the aggregate had the "BBIM_Linked_Aggregate" pset missing. Hard to know what might have caused this.

@theoryshaw
Copy link
Member Author

Very cool.. that seems to have worked.

I 'think' i know what caused it.

I think it was something like this. See video.

aggregate psets.ifc.txt

It would be nice, however, if doing something like this was possible--as i've found myself doing this quite a bit in the current workflow. That is, being able to remove sub aggregates from a parent aggregate, and have them still be linked aggregates.

2024-03-16_09-43-08_blenderBlenderblender.mp4

@brunoperdigao
Copy link
Contributor

I can implement this, but it has limitations. For exemple:
I have these two structures that are linked, and the beams are a sub-aggregate:
image

If I unassign the Beams from the Structure, remove two beams and refresh, it will work. Which means that Beams is still connected to Beams_1:
image

However, when I refresh the Structure, I will remove the Beams_1, because the Structure doesn't have a sub-aggregate anymore, so this will be reflected in Structure_1:
image

So, I would have to also unassing Beams_1 from Structure_1. That way, all the links will remain.

@theoryshaw
Copy link
Member Author

This is okay, if i'm following you correctly--as most times, if not all, if I 'remove' a sub aggregate from a parent, i delete that parent afterward.
It's kinda like 'exploding' the aggregate. :)

Perhaps this could be a future roadmap, to do this is one gesture.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants