Read specific elements from a list

Hi dynamo community!

I have a question that seen to be simple but I am not able to resolve, here it goes:

I have a list of values taking from revit of different heights. I want to read just some of the values, in this case I am interested in the values that are different than 200.

I thought to use a filter by bool mask to take the values but the it changes the order of the elements (It put first the true values and then the false ones) If that happen, It is not possible to use the list later on because the order has changed. I don’t know how to do it

Thank you in advanced ;D

Filter does what it says: it filters (narrows down) your list. But what is it that you want?

@celia.ramaj only one of those lists will come out of the “in” and another out of “out”. What are you trying to do?

Oh btw: if you want the elements filter by those who have a parameter value of 200:

Connect the list of List.FilterByBoolMask to Elements list (the same you use at Element.GetParameterValueByName).

If you only want values of 200 but want to keep list structure (returning all other values as blank) you can use an IF statement.

x==200?x:""

1 Like

And the inverse statement would also hold value.

x != 200 ? x : ““;

1 Like