Family Type Drop Down - Data Shapes

This is not giving me the drop down of family types. Any ideas on the sequence before entering the UI.DropDown Data?

Hi @Smaren

@Kulkul

Tried. Still no drop down results:

Try to use FamilyType.ByName node and write family type in code block as string.

@Deniz_Maral

Something like this? Tried a few different combinations:

Hi @Smaren,

Maybe selecting multiple Family Types will help


Data-Shapes_DropDownExample.dyn (15.3 KB)

Hi, I meant like that:

@MJB-online

I am looking to have the drop down be able to select from the list of family types. The create list just allowed the user to select the two different family types.

You can call then all family types and use them as values if you want to list all family types and select from them.
The node is from Orchid Package.

Thanks @Deniz_Maral but I prefer not to use Orchid package as its a hassle for my team to download. Any other approaches?

import clr

clr.AddReference("RevitServices")
import RevitServices
from RevitServices.Persistence import DocumentManager
doc = DocumentManager.Instance.CurrentDBDocument

clr.AddReference("RevitAPI")
from Autodesk.Revit.DB import *

clr.AddReference("RevitNodes")
import Revit
clr.ImportExtensions(Revit.Elements)


types = FilteredElementCollector(doc).OfClass(FamilySymbol)

OUT = [el.ToDSType(True) for el in types]
3 Likes

Or like this ?


Data-Shapes_DropDownExample_v01.dyn (15.5 KB)

2 Likes

@MJB-online this process doesn’t work, it doesn’t give the dropdown list instead gives only the first family type in the list.

Hi @Jackie.B,

Welcome to the forum.
Hard to say what does not work for you based on the provided info.
Can you share some screenshots?

Deniz’s method should work. The dropdown node in other screenshots is not going to work as its not how data shapes works. You need to get all families and/or their types as a list of values and then use their name as the keys into a dropdown UI node.

Yes Denis method definitely works.

@MJB-online It was my mistake, I apologies. It didn’t work before I havent updated my revit to security fix and hot fixes.
After the updates, Its works. Your Method Definitely works.

It is possible to show the graph of what to input into this script. I always have trouble with Python stuff and how to copy and paste them into my graph and understand what the input node should be. Thanks

I am looking to do the same thing. Can you share a screen shot of your finished graph for this. Thanks

In that case you need not inputs. It returns all Family Types. Just copy and paste it in Python node.