String to Elements

Hello, I’m using Revit 2024, and would like to change string to elements.
But I couldn’t find the node that can transfer object types (from string to element).

Does anyone know the node that converts object types?

Generally strings cannot change to elements, as Dynamo doesn’t know what elements they would be.

You can use nodes such as FamilyType.ByFamilyNameAndTypeName if you have the family and type name as strings however in this scenario.

If you are trying to filter your family types based on their name, connect the familyTypes output from the first node to the list input of the boolean mask node, then you will filter the original family types instead of their names.

1 Like

Hello Gavin,

thank you for replying me back. I’m enjoying your Youtube channel, and thank you for sharing your knowledge through it.

I’ve tried your solution, but the next step shows an error as an image below.
But the list shows outputs that I expect.

Is this problem occurring because I connected different object types(string to list)?

1 Like

It means one of those strings must have only split into one string, and only had one item so when you indexed its list of substrings it found nothing at index 1 (second item). Check for nulls in the itematindex and you’ll see the list that caused it.