How to get the family without the nested familys?

Hi all,

I try take make a script that remove the Duplicate Items at the same position.
The script is almost ready but I have a little issue:

The node “all elements of category” takes all the familys include the nested family.
Is there a way to take only “primair family” without the nested family below?

KG,
Jan Willem

Hi @jw.vanasselt,

You can use the SuperComponent node from Clockwork for this:

It will return null, if the element is a parent family. So run it through this, and use the output to isolate your parent families from your original list :slight_smile:

1 Like

Hi Martin,
Thanks alot!

Can you share the python script?

Yeah no probs :slight_smile:

import clr

#Import the Revit API
clr.AddReference('RevitAPI')
import Autodesk
from Autodesk.Revit.DB import *

#---###Start scripting here:###---#
elems = UnwrapElement(IN[0])

OUT = []

for i in elems:
	super = i.SuperComponent
	if super == None:
		OUT.append(i)
	else:
		OUT.append('This is a SubComponent')
1 Like

Thanks :slight_smile: