Getting rooms/spaces from linked file to fill project parameters

hi there,
I have been trying to fill room/spaces parameters of ducts/cable trays/pipes by a dynamo script which works fine. however, rooms/spaces data should be present in same model to run the script. i want that script to get input from linked architectural revit model and fill the data into working model.
Refer below screenshot of my script’s input nodes. plz help me out what nodes should i go for?

If you would copy a room from the linked model you would also copy the parameters from the linked model.

hi @Marcel_Rijsmus thank you for response!
I want to eliminate this copy/paste procedure, as bigger floor levels takes more time to copy rooms/spaces.

i suggest to deal with spaces, if you generate spaces automaticlly, it will have a parameter with room name and others

RoomtoDucts.dyn (58.9 KB)

Thanks @Marcel_Rijsmus and @khuzaimah.ElecEng I found the solution!
now there’s no need to copy rooms/space in working file, just let script do the rest of work.