Select components by material

Hi there,

I’ve got a huge IFC-model with a complex hierarchy. Certain objects (prox. few hundred) I want to select and delete by there (unique) material. Is there a way to do this and keep the hierarchy intact.

Perhaps by Ruby code?

Thanks a lot in advance!

I guess each component is at a different level of the hierarchy, isn’t it? I’m afraid that selecting elements of different levels is not possible but deleting them all is. It would be necessary to know the criteria that the components must meet to be deleted.
I move the post to ruby so that it is in the right place.

It actually is possible with the API, but since it is contrary to the GUI we would say that it is not recommended to do so.

Regardless, it is not necessary to push object references into the selection set in order to delete them.

These objects can be found but if they are groups or components and there are subgroups or child components then all the children will also be deleted if your delete the parent.

If you would just wish to remove the material assignments then yes that is possible without affecting object hierarchy.

2 Likes

Thanks for your replies. I solved it by ‘exploding’ the hierarchy and then select by material (selection toys). Though the hierarchy is gone, I’ve got the objectes grouped I wanted.