Write parameter value to element from linked room

I’m new to Dynamo, and used only someone’s else code, which is not ideal but works 50% of time, so if you will find silly mistakes it is because of that.

I found a dynamo code to write room parameter value into the leements within it but ONLY if those rooms are in the same model as element. SO I used it as base for the code here.
I get a help to collect and transform the linked rooms into Revit Rooms. But they keep showing Null and Empty List then I make Element.Solid out of it (I tried Orchid and Revit original Solid Node) - both has same problem.
I tried to get rid of nulls and empty lists by boolmask, which you can see.
I manage to get rid of nulls, but once connected to Solid.ByUnion it is result Warning

I will attach the code, so if you have a time please look at it as well.


Room Number from Link to Elements.dyn (65.7 KB)

Thank you for any advices!

Start by changing the list levels on List.IsEmpty to @L2 - that’s the level your lists are at. Then make sure your list structure matches through the rest of your graph. You shouldn’t need to check for nulls in the geometry since the node will either return the solid(s) or an empty list.