Selecting the Family from Elements in a Revit Model

Hi Everyone, very confused here.

This topic is better named, Family Instances, Families, Family Types, Elements, Element Types and Whats Whats??

Basically I have some ducting in a Revit Model which I would like to select and bring into Dynamo and determine what elements are a Rectangular Duct or Round Duct. There are many ways to do this, but I would like to get an understanding of the hierarchy the Revit API works with or better yet the naming convention as I can’t seem to understand how it it corresponds to Revit itself.

The image below sums up the problem. Looking at the project browser I can see under “Ducts” we have “Oval Duct”, “Rectangular Duct” and “Round Duct”. These are the names I am trying to bring through into Dynamo. To my understanding these are Families. The category is “Ducts” and the Family Types are “Default”.

Now from the node description Element.ElementType this returns the Family Type but I can’t seem connect up any corresponding nodes that take Family Type as an Input. (They all flag yellow). Using the get parameter node and calling for the Family seems to return the Family Type and I have attempted to use FamilyInstance.GetFamily nodes connecting right off the Select Elements block with no luck. I have used the FamilyInstance.GetType block before with the node of All Elements of Category so I assumed it could be used here.

I’m starting to realise I do not have good grasp on the naming convention/hierarchy Dynamo works in. Any help would be greatly appreciated.

Hi @nikhilmakan02

Looks like those are fabrication parts. What happens if you connect “Element.Name” node after GetParameter node of Family.

Hi @Kulkul

Thanks for the response. Unfortunately no luck there all I get is essentially the Family Type Name. Notice how the blocks all flag yellow with warnings as well. The warning is “Asked to convert non-convertible types”

@nikhilmakan02 Are you looking for this?



That’s perfect. Exactly what I was looking for. If you don’t mind do you by any chance know why the following does not work?

Why does the first Element.GetParameterValueByName and Element.ElementType return the same information if one is calling for the Family Type and the other is calling for the Family and regardless of them calling for the same information. Surely Family.Name should attain the same output as your solution?

Ducts/Pipes are system based family. Family.Name expects Revit.Elements.Family. Here is an example:

1 Like


Thanks a lot! Appreciate it.