# Get rooms in linked file

**URL:** <https://forum.dynamobim.com/t/get-rooms-in-linked-file/4939>\
**Category:** Packages\
**Created:** [July 8, 2016, 6:19am UTC](https://forum.dynamobim.com/t/get-rooms-in-linked-file/4939 "2016-07-08T06:19:38Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Paul\_Wintour](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/paul_wintour/32/9381_2.png) [@Paul\_Wintour](https://forum.dynamobim.com/u/Paul_Wintour)\
**Post date:** [July 8, 2016, 6:19am UTC](https://forum.dynamobim.com/t/get-rooms-in-linked-file/4939/1 "2016-07-08T06:19:38Z")

</div>

I am trying to get rooms from a linked model. It should be pretty straight foward and has been dicussed a few times already:

[http://dynamobim.org/forums/topic/get-all-elements-from-linked-model-by-archi-lab/](http://dynamobim.org/forums/topic/get-all-elements-from-linked-model-by-archi-lab/)

> [@I need access to linked files rooms but nodes return "null"](https://forum.dynamobim.com/t/i-need-access-to-linked-files-rooms-but-nodes-return-null/1686/15):
>
> Hey Konrad! So I have tested out the new code and it appears to be working perfectly! The only thing I am struggling with now is Dynamo list management, something I haven’t fully gotten my head around since I’m very comfortable coming from another program who’s name shall not be mentioned. That ‘other program’ at least makes the clear distinction between list and branch allowing for grouping and isolation. In my example posted below, how can I choose to retrieve all the links and apply the same …

> [@Rooms from linked files](https://forum.dynamobim.com/t/rooms-from-linked-files/2338):
>
> Try to get rooms from linked files, it works for one, but how to get them from two or more files? [Rooms-from-liked-files]

But I’m just getting null. Any ideas as to why this would be the case?

 ![](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/2X/d/dfc4d23ef594f51516a05438da5ece8229bcfe3e.jpg)

---

<div class="post-metadata">

**Author:** ![Tomasz\_Puchala](https://avatars.discourse-cdn.com/v4/letter/t/5f9b8f/32.png) [@Tomasz\_Puchala](https://forum.dynamobim.com/u/Tomasz_Puchala)\
**Post date:** [July 8, 2016, 7:21am UTC](https://forum.dynamobim.com/t/get-rooms-in-linked-file/4939/2 "2016-07-08T07:21:55Z")

</div>

Try this.  
 ![](https://cdck-file-uploads-us1.s3.dualstack.us-west-2.amazonaws.com/flex022/uploads/dynamobim/original/2X/6/6f155bf80f91397ddf49159a82c4f7cb31d66108.png)  
PS Just realised you pass elements instead of category: delete “all elements of category”

---

<div class="post-metadata">

**Author:** ![Paul\_Wintour](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/paul_wintour/32/9381_2.png) [@Paul\_Wintour](https://forum.dynamobim.com/u/Paul_Wintour)\
**Post date:** [July 11, 2016, 3:52am UTC](https://forum.dynamobim.com/t/get-rooms-in-linked-file/4939/4 "2016-07-11T03:52:04Z")

</div>

Ahh thanks. rookie error

---

<div class="post-metadata">

**Author:** ![Andrea\_Botti](https://avatars.discourse-cdn.com/v4/letter/a/db5fbb/32.png) [@Andrea\_Botti](https://forum.dynamobim.com/u/Andrea_Botti)\
**Post date:** [January 31, 2017, 5:21pm UTC](https://forum.dynamobim.com/t/get-rooms-in-linked-file/4939/5 "2017-01-31T17:21:24Z")

</div>

Hi guys,  
@Tomasz_Puchala is there an easy way to extend this script to get rooms from several linked files?

I have used the `Springs.Collector.LinkedInstanceElements` but that seems to work with one linked instance at the time?

 ![](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/7/e/7e070d8ec769ef03c2b114554c6629b758fcbd30.PNG)

Thanks,  
Andrea

---

<div class="post-metadata">

**Author:** ![Mostafa\_El\_Ayoubi](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/mostafa_el_ayoubi/32/7815_2.png) [@Mostafa\_El\_Ayoubi](https://forum.dynamobim.com/u/Mostafa_El_Ayoubi)\
**Post date:** [January 31, 2017, 6:46pm UTC](https://forum.dynamobim.com/t/get-rooms-in-linked-file/4939/6 "2017-01-31T18:46:25Z")

</div>

HI @Andrea_Botti , and happy anniversary 🙂  
it seems to work in a straight forward way :

 ![](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/b/f/bf6c8783d0ba3b71eee80420bb1e7174bff137f5.png)

---

<div class="post-metadata">

**Author:** ![Andrea\_Botti](https://avatars.discourse-cdn.com/v4/letter/a/db5fbb/32.png) [@Andrea\_Botti](https://forum.dynamobim.com/u/Andrea_Botti)\
**Post date:** [February 1, 2017, 6:45pm UTC](https://forum.dynamobim.com/t/get-rooms-in-linked-file/4939/7 "2017-02-01T18:45:22Z")

</div>

@Mostafa_El_Ayoubi thank you very much for your reply. However, I do not get the two-tiered list you get. Do you have any advice on why that could be?

Andrea

 ![](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/f/1/f1a992d4bcc2ea83a9b8bebb72e8f2784c69d667.PNG)

---

<div class="post-metadata">

**Author:** ![Eoin\_Prunty](https://avatars.discourse-cdn.com/v4/letter/e/3be4f8/32.png) [@Eoin\_Prunty](https://forum.dynamobim.com/u/Eoin_Prunty)\
**Post date:** [February 24, 2017, 2:31pm UTC](https://forum.dynamobim.com/t/get-rooms-in-linked-file/4939/8 "2017-02-24T14:31:22Z")

</div>

I had the same problem but when I set the LinkInstance input’s listing to ‘Use Levels’ (at L1) and ‘Keep List Structure’ it pulled all rooms.

 ![](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/4/d/4dc2e3d01d51154f7161c7b909a1ce3902083fb6.png)

---

<div class="post-metadata">

**Author:** ![e1uvs](https://avatars.discourse-cdn.com/v4/letter/e/e274bd/32.png) [@e1uvs](https://forum.dynamobim.com/u/e1uvs)\
**Post date:** [November 17, 2017, 11:26pm UTC](https://forum.dynamobim.com/t/get-rooms-in-linked-file/4939/9 "2017-11-17T23:26:18Z")

</div>

Has anyone then taken this information and written it into a parameter in your working file? I am trying to do that without any such luck.

---

<div class="post-metadata">

**Author:** ![Nazzynoodles](https://avatars.discourse-cdn.com/v4/letter/n/5f8ce5/32.png) [@Nazzynoodles](https://forum.dynamobim.com/u/Nazzynoodles)\
**Post date:** [April 21, 2020, 10:20am UTC](https://forum.dynamobim.com/t/get-rooms-in-linked-file/4939/10 "2020-04-21T10:20:18Z")

</div>

Hi,

Sorry I’m late to the party but will this script for coppying and pasting rooms from a linked file work if there are no separation lines in the linked file?
