Finding referenced element within spaces?

Hi All,

I’m trying to calculate the number of doors, windows and columns in a space for MEP calculation. The problem is they are all in separate files: Archi, structure and MEP. It makes the script design not as obvious. Is there any good hint or ideas to approach this scenario?