Why can I not get a true/false list between room boundaries and FamilyInstance.GetHost?

Hello everybody,

I need some help,
I am trying to get a true/false list between room boundaries and FamilyInstance.GetHost but I can not get it?

Somebody with any idea about the problem
In the Photo below is my code. If you see the code block is no working properly, also if I am trying to cross it with a<2>… I have tried everything that I can… but it is still not working.

Thank you

You are comparing the wrong list!

Hi M.Perez, and thank you for your response.

Maybe I don´t understand very well, because I am new on this but… If I am not in the wrong way… FamilyInstance.GetHost(b) get you a wall, and this wall I want to compare with “a” and get a list with true or false… Am I wrong at some point?

You just connected the wrong node. You have connected Elements in Room Output with “b” instead of FamilyInstace.GetHost. That is what I was trying to explain with the red line.

Connect the Output FamilyInstance.GetHost and you should have it (or almost, you may adjust lacing/hierarchy to make it work as expected.).

@M.Perez look closely and you’ll see he has the GetHost function in the code block.
@alejandre It looks like a list management issue to me. Instead of a code block use the == node and list levels.
also depending on what exactly you want to do you might need to set the lacing of that node to cross product.

1 Like

You are right! I haven’t seen that he has GetHost in the Block.

@alejandre like @viktor_kuzev sais you are comparing the host of the first door with the first wall of the first room. If the door is in the second wall, you will get a false as a result. But then it won’t compare the host of the first door with the second wall but the second with the second and then the third with the third.

Hi guys, thanks to both of you to reply my question and sorry also for my delay to reply you.

I´ve been comparing the list from Elements --> Room.Boundaries with the list from FamilyInstance.GetHost with every possible ways… but I received always an error an it was because of my Revit/Dynamo Version.

I just needed something like in the Dynamo Version from Revit 2019… something like List.ContainsItem… I didn´t know that It doesn´t exist anymore in Dynamo for Revit 2020 (my actual Version)

I have tried to cross the product with List.Contains with Equals… and everything… with the same result… still not working…

But at the end of my desperation I found a way… and I hope it will be helpful for you guys in future… thanks a lot to pay attention to my post.

Best regards.