Host object filter

Hi, All

I create program for place a ferrules on face. but i get the host object from that ferrules it’s given a 4 ferrules are host in dynamo. actually i select 2 ferrules in revit that can i see not associated and other 2 ferrules are shown Basic Wall : Generic - 200mm.(See Images)

my problem is how to get hosted object and non-hosted object in dynamo??


I know what you mean, some families have no association:


2020-10-07_12h33_47 2020-10-07_12h33_30

I can`t help you directly, but i have simular issues.



an example with Host property

import sys
import clr
from Autodesk.DesignScript.Geometry import *

from Autodesk.Revit.DB import *

elems = UnwrapElement(IN[0])
# get non-hosted objects
lstElemMissingHost =  [x for x in elems if x.Host is None]
# get hosted objects
lstElemHosted =  [x for x in elems if x.Host]

OUT = lstElemMissingHost, lstElemHosted
1 Like

Hi, c.poupin

Thanks for your reply

i use the python code but is not working.(see image)

Any other suggestion.

because Revit waits for the end of the Process (you create instances in your script) to check the hosts if a host is not found Revit changes the status