Select elements by unique list

Hi, I would like to make a script, which select unique model elements according to the value of parameter. I have 20 column that have the number 1 and 10 column that have the number 2 and I only want to pick one each of number. I’ve tried with List.CountOccurences but I don’t understand why I am getting various results on the “==” node.

Is there any other way?
Thank You

Hi,

The node you need is the UniqueItems from List :

image

As for the “==” node, it is a Boolean operator that will compare the 2 inputs and return “True” if they are the same, “False” otherwise so probably not what you were looking for here.

Ok, but how to move from list (out) to element (in)?

Is this what you’re trying to do ?

I finally figured it out! Very helpful was your idea to use List.UniqueItems, but also I had to use List.IndexOf to link it with SelectInRevit. Thanks :slight_smile: