@Sean1 I am not sure that it would be this easy. Please provide an image of your proposed solution so that we can try it out.
Now my understanding is that @NurlanAdsk wants to create a list of all bounding elements (walls?), and then under each wall list what rooms are bound by this wall.
Here’s my take on it:
Code for the custom Python node:
# Copyright(c) 2018, Konrad K Sobon
# @arch_laboratory, http://archi-lab.net
from Autodesk.Revit.DB import *
errorReport = None
output = [ for i in range(len(IN))]
for index1, i in enumerate(IN):
for index2, j in enumerate(IN):
if i in j:
# if error occurs anywhere in the process catch it
errorReport = traceback.format_exc()
# Assign your output to the OUT variable
if None == errorReport:
OUT = output
OUT = errorReport
Basically the idea is that we first get all of the rooms, and their bounding elements. I flatten the list of bounding elements because one wall can bound multiple rooms, so we want to remove all duplicates. Next, I use a little Python code, to iterate over every unique wall, that we know participates in bounding of at least one room, and add them to a list. The output here basically lists what rooms are bound by each wall.