Data|Shapes DropDown for ViewFamilyTypes

I’m trying to get a dropdown selection to work with Data|Shapes that allows the selection of the view types - specifically the elevation type. I tried using the ViewFamilyTypes node among others, but it doesn’t seem to work. The Keys_ and Values_ are getting me a little hung up. In the image below, I’m trying to get what’s shown in the ViewFamilyTypes node to be available in the Data|Shapes DropDown Data node.

Thank you!

Hi @Thom_Krejci ,

The Data-Shapes nodes expects two lists of equal lengths, so you’ll have to input a list containing all those items (Credits to @Mostafa_El_Ayoubi) :

After selection:

import clr
clr.AddReference('RevitAPI')
from Autodesk.Revit.DB import*
clr.AddReference('RevitServices')
from RevitServices.Persistence import DocumentManager
clr.AddReference('RevitNodes')
import Revit
clr.ImportExtensions(Revit.Elements)

doc = DocumentManager.Instance.CurrentDBDocument

viewfamilies = FilteredElementCollector(doc).OfClass(ViewFamilyType).ToElements()

OUT = viewfamilies
1 Like