Select specific family types by name of the family or category

Hello.

I’m trying to rename family types using “Element.Setname” so I have to enter family types, but since im changing them with a list of data, I need them to match the same position as the data on the list.
Lets say that my “data list” contains 5 names and my “family type list” contains 20 types. I want to choose only the 5 I need out of the 20 types that will appear, and those 5 arrange them specifically so they match the information in the other list.

-When reaching ElementSetName

  • Input Element list is in Random order extracted by Dynamo from revit
    -Input name has the new values in order
    so the output list has the new values but not in the family types I need

Try to add List.AllIndicesOf node. As first input use selected family types from revit (you have elements.name node for it). As second input use old type names from excel.

Then use List.GetItemAtIndex. List input will be All family types from category node