Filter a list of elements by id

Hi everyone,

Dynamo forum.dyn (194.4 KB)

I have 44 sensors and consequently 44 sensor temperature values from database.
The number of sensors changes according to the data time.
The total number of sensors exported from the Revit model is 101.
The problem is that when i want to set the temperature parameter to my elements in the model they have a different number (101) than the detected temperature values ​​(in this case 44).
I would like to filter my list of elements (Revit.Elements in blue) based on the list of sensors detected by the database (System.String in red), or any other method to find a solution.
Thanks to all

Hey there,

You need to find the index of your database sensor among the sorted keys, and use those to get the revit sensors from the sorted list.

Here is an overview of the result :

1 Like

Thank you so much @lkichenin!
It was really useful.