Select several elements and identify their environments

Colleagues, could you help me with a routine?
I’ve been trying for hours, I’ve tested several ways but I haven’t been able to get the result.
I need to do the following steps;
1 - Search for revit links (ok)
2 - Identify your environments (ok)
3 - List the names of the links with each environment (ok)
4 - identify the size of each room on the list (I COULDN’T)

2nd step

Then I tried to create the option to give an input to hide the revit links and leave only the project and cad link of the current project in view.
After selecting the cad with its rooms and walls, also identify its rooms, the name of the cad link, and take the measurements, as in the revit links.

But I was unable to select the cad, walls and environments at the same time and generate this information. Whats wrong? I appreciate any help!


Comparação.dyn (99.6 KB)