Select All Objects by Model Role

Hello,

What is a way to select all objects using the Role as the filter? I’m trying to use SelectionFilter.FilterSelectionByType to help select all beams (using GetSteelObjectsByType), then filter the selection based on model role. In the FilterSelectionByType node, there is a slot called ObjectTypeFilters. That seems to be the logical one to use but need tell it to use the model role without throwing an error.

Any insight will be greatly appreciated. Thanks.

Hi @brettbarkman ,

It would be really helpful if you could share some models, dynamo files, screenshots, etc.

Hi @brettbarkman & @Daan ,

The node SelectionFilter.FilterSelectionByType sounds promising indeed, but I did not get it started neither.

You can select elements on the model role criteria, but then you have to convert object Property to string and then use List.FilterByBoolmask.

I managed to set User Attributes this way, but I think this is a bad start,

If somebody knows how to work with actual properties & values, I would like to test whether it is doable to assign attributes on a full scale project.