How to get rooms from linked files?

Hi All,
I have linked one architecture model to my master model.I want to get rooms from linked architecture model from the active view of master file.(not all rooms from architecture model)
below snapshot of code retrieves all rooms from linked file.

any help?

seems only 4 rooms only existing in the linked model.

see if that helps