# Find host type for families in project browser but not placed

**URL:** <https://forum.dynamobim.com/t/find-host-type-for-families-in-project-browser-but-not-placed/14918>\
**Category:** Revit\
**Created:** [September 19, 2017, 10:35am UTC](https://forum.dynamobim.com/t/find-host-type-for-families-in-project-browser-but-not-placed/14918 "2017-09-19T10:35:03Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![simon\_murphy1](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/simon_murphy1/32/101536_2.png) [@simon\_murphy1](https://forum.dynamobim.com/u/simon_murphy1)\
**Post date:** [September 19, 2017, 10:35am UTC](https://forum.dynamobim.com/t/find-host-type-for-families-in-project-browser-but-not-placed/14918/1 "2017-09-19T10:35:03Z")

</div>

Hi All,

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.

Thanks, Simon

![42](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/c/4/c429c5105ff6d69c61648ab90e5d6c2a722886a5.png)

---

<div class="post-metadata">

**Author:** ![Nick\_Boyts](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/nick_boyts/32/76313_2.png) [@Nick\_Boyts](https://forum.dynamobim.com/u/Nick_Boyts)\
**Post date:** [September 19, 2017, 2:05pm UTC](https://forum.dynamobim.com/t/find-host-type-for-families-in-project-browser-but-not-placed/14918/2 "2017-09-19T14:05:05Z")

</div>

Host is a family parameter. You’ll have to get the family element, not the family instance.

---

<div class="post-metadata">

**Author:** ![simon\_murphy1](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/simon_murphy1/32/101536_2.png) [@simon\_murphy1](https://forum.dynamobim.com/u/simon_murphy1)\
**Post date:** [September 19, 2017, 3:22pm UTC](https://forum.dynamobim.com/t/find-host-type-for-families-in-project-browser-but-not-placed/14918/3 "2017-09-19T15:22:16Z")

</div>

Hi Nick,

Thanks for the reply. It seems not all families have Host Type has a family parameter.

---

<div class="post-metadata">

**Author:** ![Nick\_Boyts](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/nick_boyts/32/76313_2.png) [@Nick\_Boyts](https://forum.dynamobim.com/u/Nick_Boyts)\
**Post date:** [September 19, 2017, 3:31pm UTC](https://forum.dynamobim.com/t/find-host-type-for-families-in-project-browser-but-not-placed/14918/4 "2017-09-19T15:31:10Z")

</div>

I think they all have the parameter but some families obviously don’t use a host.

---

<div class="post-metadata">

**Author:** ![simon\_murphy1](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/simon_murphy1/32/101536_2.png) [@simon\_murphy1](https://forum.dynamobim.com/u/simon_murphy1)\
**Post date:** [September 19, 2017, 3:33pm UTC](https://forum.dynamobim.com/t/find-host-type-for-families-in-project-browser-but-not-placed/14918/5 "2017-09-19T15:33:38Z")

</div>

Hi Nick,

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?

---

<div class="post-metadata">

**Author:** ![john\_pierson](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/john_pierson/32/191977_2.png) [@john\_pierson](https://forum.dynamobim.com/u/john_pierson)\
**Post date:** [September 19, 2017, 3:34pm UTC](https://forum.dynamobim.com/t/find-host-type-for-families-in-project-browser-but-not-placed/14918/6 "2017-09-19T15:34:39Z")

</div>

This is accessible in the document of the family.

> **[Determining if a Family was created using Wall, Floor, Face, Ceiling or Roof...](http://adndevblog.typepad.com/aec/2012/10/determining-if-a-family-was-created-using-wall-floor-face-ceiling-or-roof-based-templates.html)**
>
> By Saikat Bhattacharya Using the Revit API, we can determine if a family was created using a Wall, Floor, Face, Ceiling or Roof based template. This is particularly helpful in case of, say, a generic mass family which can be created with any of the...

---

<div class="post-metadata">

**Author:** ![john\_pierson](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/john_pierson/32/191977_2.png) [@john\_pierson](https://forum.dynamobim.com/u/john_pierson)\
**Post date:** [September 19, 2017, 3:44pm UTC](https://forum.dynamobim.com/t/find-host-type-for-families-in-project-browser-but-not-placed/14918/7 "2017-09-19T15:44:32Z")

</div>

This should do it.

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/1/5/1564341d51ecf9cc235894b66fc84ef287331189.png)  
use this chart for what each number means in regards to hosting (I believe 0 means it does not require a host)  
 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/4/2/42f49045619bfabf4ea31c2aa0bc2181a376577b.png)

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
```

---

<div class="post-metadata">

**Author:** ![Nick\_Boyts](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/nick_boyts/32/76313_2.png) [@Nick\_Boyts](https://forum.dynamobim.com/u/Nick_Boyts)\
**Post date:** [September 19, 2017, 4:28pm UTC](https://forum.dynamobim.com/t/find-host-type-for-families-in-project-browser-but-not-placed/14918/8 "2017-09-19T16:28:19Z")

</div>

You don’t even need to access the family document, you can get it directly from the project definition.

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/6/7/67bda20bea8385773ece88c7b941101931a46b5f.png)

---

<div class="post-metadata">

**Author:** ![simon\_murphy1](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/simon_murphy1/32/101536_2.png) [@simon\_murphy1](https://forum.dynamobim.com/u/simon_murphy1)\
**Post date:** [September 20, 2017, 1:12pm UTC](https://forum.dynamobim.com/t/find-host-type-for-families-in-project-browser-but-not-placed/14918/9 "2017-09-20T13:12:27Z")

</div>

Thanks Guys,

Thats exactly what I was looking for.

[Arraying Families By Host Type #2.dyn](https://forum.dynamobim.com/uploads/short-url/7qPCUS7uvDRKvMxNqs4hIfx143O.dyn) (31.5 KB)
