Get all elements of picked family

Hi everyone,
I’m making a dynamo and I want to get all the elements of a picked family.

Can you explain me how I can do this ?

Thx :slight_smile:

In your case the mistake is to use FamilyType.Name, because it’s converting an Element to a string, and the node AllElementsOfType needs an Element.

Here 2 examples, in case you want only a specific Type or all the Family Types:

Thank you but how can I get all the elements of a selected family ?

I showed you, the lower part of the image:
FamilyInstance.GetFamily > Family.Types > All Elements of Family Type

Is it not what you need?

1 Like

@m.quijada as @lucamanzoni mentioned, that’s what you need.

1 Like

I don’t know why it doesn’t works


Ah structural framing requires a different node:


ok it works now :slight_smile:
Thank you @3Pinter & @lucamanzoni !!

1 Like

you are welcome!

ps. mark a reply as solved to help others.

done :wink:

@3Pinter ok, but this is to get all the elements of a type, not of a family (and it’s the same as the top part of the first graph I posted).

Let’s say you have a IPE beam family, with 3 types (180, 240, 300), each one 3 elements (9 in total).
In this way you get only the instances of the same type (i.e. 3 x 180), not all the IPE beams.

I was working on something like this, maybe it can be simplified further:

PS. From which package is StructuralFraming.Type node?


StructuralFraming.Type is OOTB.

Below food for thoughts?

I spent at least 15 minutes looking for it and couldn’t find it, I probably need a holiday. I will look for it again tomorrow :wink:

Grab that good-morning-coffee and you’ll find it at Revit > Element > StructuralFraming > Type

Thanks @3Pinter , I found it but only in version 1.3, same for node FamilyInstance.GetType.
When I open Dynamo 2.0.2 (the one I always use), I don’t have those nodes.

Here from 1.3:


And here from 2.0.2:


So I wasn’t actually completely blind :wink:
But actually it’is weird, because in the Dictionary it says version 1.x 2.x

Which version are you using?

Both, but you are right, this one was done in 1.3 not 2.x

Hmm. Did we accidently bump into a bug?
(and fyi: not available in 2.x for me too)

In 2.x we could:


True! I guess they replaced the StructuralFraming.GetType and FamilyInstance.GetType to a more generic (and better) ElementType!

The methods are however still available usign a codeblock:



Yeah, better and more logical approach.

Oh well, more reasons to go to 2.x!

Hello Luca,

I have a similar problem, but I’m not sure how to solve it. I want to select a specific family that has a lot of types and those types that are in use to assign them numbers.
I did it but only for one type, but I want to do it for all types that are active.

Thanks in advance

Liebe Grüße