Get element from a string

Hi. So, I have made a “mark” in the comments, like, element 1 has a “1” in the section “comments”, element 2 has “2”, and so on. I’ve made this because revit creates a lot of elements I don’t need to the analysis I’m making (in this case, pype systems). I know I can make get the elements with something in the “comment” section like this::

In the first red cyrcle I have all the elements and in the second one the string comment on the specific elements. Now, I just need to to the backward process, so he can understand, forward, which element is wich. In short, I need from the list of the last cyrcle to appear the green ID revit gives to elements. (Farly new in dynamo, sorry)

I f I understand u correctly…

That would do part of the it. But imagine you want to give a list of certain parameters, like wallpaper heigh. You have the list of the wall heigh, and you want Dynamo to retrieve the walls with that heigh. Can it be done?

Sure u can once u face an issue just show it, I will help

That os my issue xb i have the list of the comments, but they are not in an ascending order. I want to give a list to dynamo, wich i already have there, like [1,2,5,4,7,9], and Dynamo to get the element wich has that integer in the comment section

Like that ?

Yes, I think is something like that. I’m saying thinking because I can’t quite understand what the “sortbyindexvalue” is doing there.

This are all the elements I have and the “filter” that only shows wich ones have the marks. What I want,
is to give this next list of values, for Dynamo recognize the elements that have that specific mark and list them (as elements of Revit) with that order) btw, notice the order is ascending, but only for the model I’m building, and I’m trying to do something generic.

And thanks once more, I’m just a litle confused because I got to this part fairly quickly and got stucked in this step. Thanks for your patience :wink:

Thnanks, this got me where I wanted :wink: