Get Viewport ElementType based on Name

I have tried to cobble together some bits from several different postings. ( Change Viewport Type Family - Revit - Dynamo ( )

Overall, I am trying to change the viewport type based on the scale of the view.

From the image above, in the Watch node, I have two names of viewport types. In the blue group, I can get the element type but only by searching one at a time and applying a mask.

Is there a way to input the names in the list a retrieve the ElementType?

Thank you!


*note: it might be called ElementClass.ByName in 2023. (I am in 2022 at the moment and haven’t had a chance to check)

1 Like

I already shut Revit down but when I saw your elegant response, I had to fire it back up.

Complete success! I thought it had to be something relatively simple and I appreciate your response.

Thank you again!

[Now let’s see if I can do what I think I can do with it] :grinning:

1 Like