Getting family names by string

Hello everyone, I want to choose family type from a list by index. I dont want to choose the familys one by one I want to change just the index and get the right family on revit. Is there anyone who has any idea about how can I do that ?


Thank yo for help in advance

What is logic behind why you would chosse the items at the index’s you have.

Else i can give you a random nunmber generator to pick whatever index’s i feel like?

the index is not important, I just wanna change structural framing type by index

Oh i think i understand,

Your selection list is a list of strings, but you want to collect that as a list of structural framing types.

And then use a code block like x[3];

Where thr integer after x is the number of the item on the list you want to select?

exactly

probably something here will help you replace your list of string with framing types.

And then use the be mentioned method w the code block x[1,2,3, etc…] to pull out the item you want from that list.

Hello there,

Using type names to find family types may not be a reliable method as there could be multiple family types with the same name.
However, if you insist on finding family types by name, you can consider creating a solution like the following image in your Dynamo Session.
Keep in mind that it could result multiple elements with the same type name.

1 Like

Thank you for help NIRMAL, the way you suggested is working and I can get one familiy by defining it as string but I want to get families as a list not only one of them.


Do you know how can I get all the families inside code block ?

actually I found better solution. I am sharing here incase someone needs it in future