Filter Structural Framing by Reference Level

Hi all,
I’m trying to create a dynamo script that filters selected structural framing elements in a specific view by their Reference Level parameter value. I’m using the Rythm “Get Parameter Value By Name” node. but can’t manage to filter the specified level I want by name.
Any Ideas?

That’s actually the out of the box node, not a custom one (good thing as it’s one less dependency to manage and it does what you need).

When coding in order to compare objects you need to convert them into something which can be compared. As the ReferenceLevel parameter stores an element, Dynamo is returning the full element. I recommend pulling the ID of the element using an Element.Id node This should return an integer (whole number) which is comparable. Next add a Levels dropdown to select the level you want, and pull the ID from it as well. The two element IDs can feed into the == node and then you can use a List.FilterByBoolMask to filter the list of elements (from the All Elemetns Of Category in View node) by the boolean mask from the == node.

2 Likes

Hi @user1JRQDE and welcome…here is another way, there probably could work as well

2 Likes