Does anybody know of a way to find the host type for families loaded into a project but not placed as instances?
I have tried to get parameter node and also clockwork package element host.
Neither of which produce any data for families not placed. What I am trying to do is filter a list so I can place instances by host type in an array of all loaded families.
Below is an image of a workflow that doesn’t work.
What I am trying to do is to create an array of all the families in an project but I first need to know how the find the host type of each family. Do you know which nodes can select family types not family instances?
use this chart for what each number means in regards to hosting (I believe 0 means it does not require a host)
and the python script
import clr
# Import ToDSType(bool) extension method
clr.AddReference("RevitNodes")
import Revit
clr.ImportExtensions(Revit.Elements)
from System.Collections.Generic import *
# Import RevitAPI
clr.AddReference("RevitAPI")
import Autodesk
#The inputs to this node will be stored as a list in the IN variable.
dataEnteringNode = IN
#unwrap all elements to use with API
items = UnwrapElement(IN[0])
typelist = list()
for i in items:
try:
typelist.append(i.OwnerFamily)
except:
typelist.append(List())
#Assign your output to the OUT variable
OUT = typelist