# Elevation of linked Level respect to hosted file

**URL:** <https://forum.dynamobim.com/t/elevation-of-linked-level-respect-to-hosted-file/31902>\
**Category:** Developers\
**Created:** [February 9, 2019, 2:11pm UTC](https://forum.dynamobim.com/t/elevation-of-linked-level-respect-to-hosted-file/31902 "2019-02-09T14:11:17Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![aversiyava](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/aversiyava/32/62031_2.png) [@aversiyava](https://forum.dynamobim.com/u/aversiyava)\
**Post date:** [February 9, 2019, 2:11pm UTC](https://forum.dynamobim.com/t/elevation-of-linked-level-respect-to-hosted-file/31902/1 "2019-02-09T14:11:17Z")

</div>

Hello everybody,

I have a project file with many linked files in it (tiny houses). Every linked file has its own level, and I’m trying to get the elevation of that level respect to the ground level of the hosted file. How would you do it in python? Properties like BoundingBox or Location are not working (I get Location but not the point…), and Elevation property gives me the elevation respect to the ground level of the linked file, of course. This is part of my code, if it helps:

```
for room in rooms:
    roomLevel = room.Level.Elevation
    for linkInstance in linkInstances:
        linkDoc = linkInstance.GetLinkDocument()
        #RDS1
        try:
            allCeilings = FilteredElementCollector(linkDoc).OfCategory(BuiltInCategory.OST_Ceilings) \
                                                           .WhereElementIsNotElementType() \
                                                           .ToElements()
            for ceiling in allCeilings:
                ceilingLevelId = ceiling.LevelId
                ceilingLevel = linkDoc.GetElement(ceilingLevelId)
                test.append(ceilingLevel) 
        except:
            pass     

```

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![simon\_murphy1](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/simon_murphy1/32/101536_2.png) [@simon\_murphy1](https://forum.dynamobim.com/u/simon_murphy1)\
**Post date:** [February 9, 2019, 2:24pm UTC](https://forum.dynamobim.com/t/elevation-of-linked-level-respect-to-hosted-file/31902/2 "2019-02-09T14:24:21Z")

</div>

Bimorph nodes package might be starting point. They have a get linked element of category node.

---

<div class="post-metadata">

**Author:** ![aversiyava](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/aversiyava/32/62031_2.png) [@aversiyava](https://forum.dynamobim.com/u/aversiyava)\
**Post date:** [February 9, 2019, 2:30pm UTC](https://forum.dynamobim.com/t/elevation-of-linked-level-respect-to-hosted-file/31902/3 "2019-02-09T14:30:32Z")

</div>

Thanks Simon for your responde. I know how to get linked elements and their properties, but the problem I have now is with levels. Bimorph nodes are not accessible and I can not check the python code.

---

<div class="post-metadata">

**Author:** ![Marcel\_Rijsmus](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/marcel_rijsmus/32/8539_2.png) [@Marcel\_Rijsmus](https://forum.dynamobim.com/u/Marcel_Rijsmus)\
**Post date:** [February 9, 2019, 2:42pm UTC](https://forum.dynamobim.com/t/elevation-of-linked-level-respect-to-hosted-file/31902/4 "2019-02-09T14:42:23Z")

</div>

hi,

what method for linking did you use? Shared coordinates or something else?

---

<div class="post-metadata">

**Author:** ![aversiyava](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/aversiyava/32/62031_2.png) [@aversiyava](https://forum.dynamobim.com/u/aversiyava)\
**Post date:** [February 9, 2019, 4:45pm UTC](https://forum.dynamobim.com/t/elevation-of-linked-level-respect-to-hosted-file/31902/5 "2019-02-09T16:45:56Z")

</div>

Hi Marcel,

I used the basic way, just Insert/Link Revit.

---

<div class="post-metadata">

**Author:** ![Marcel\_Rijsmus](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/marcel_rijsmus/32/8539_2.png) [@Marcel\_Rijsmus](https://forum.dynamobim.com/u/Marcel_Rijsmus)\
**Post date:** [February 9, 2019, 4:50pm UTC](https://forum.dynamobim.com/t/elevation-of-linked-level-respect-to-hosted-file/31902/6 "2019-02-09T16:50:32Z")

</div>

in the basic way you have 4 options.  
to help you its important to know what choice you made  
if you are on the same computer the method you have chosen is probably set as default now.  
so go to insert an link a new revit file, check the default and abort

---

<div class="post-metadata">

**Author:** ![aversiyava](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/aversiyava/32/62031_2.png) [@aversiyava](https://forum.dynamobim.com/u/aversiyava)\
**Post date:** [February 9, 2019, 5:17pm UTC](https://forum.dynamobim.com/t/elevation-of-linked-level-respect-to-hosted-file/31902/7 "2019-02-09T17:17:14Z")

</div>

Ah OK, I understand: I used _Auto - Origin to Origin_

---

<div class="post-metadata">

**Author:** ![Marcel\_Rijsmus](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/marcel_rijsmus/32/8539_2.png) [@Marcel\_Rijsmus](https://forum.dynamobim.com/u/Marcel_Rijsmus)\
**Post date:** [February 9, 2019, 5:32pm UTC](https://forum.dynamobim.com/t/elevation-of-linked-level-respect-to-hosted-file/31902/8 "2019-02-09T17:32:23Z")

</div>

the easiest way is to make a Level schedule  
click the tick mark for include Linked Models  
and specify in the available fields: name and elevation and if you click on Levels above the fieldnames change it to Revit Links an add the Revit filename from the fields  
click OK  
now you have most of it i guess, without opening Dynamo 🙂

---

<div class="post-metadata">

**Author:** ![aversiyava](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/aversiyava/32/62031_2.png) [@aversiyava](https://forum.dynamobim.com/u/aversiyava)\
**Post date:** [February 9, 2019, 5:55pm UTC](https://forum.dynamobim.com/t/elevation-of-linked-level-respect-to-hosted-file/31902/9 "2019-02-09T17:55:35Z")

</div>

Thank you very much, Marcel. I like the idea but it’s not working 😅, because it says that all the elevations are equal, and it’s not true (every linked file is in different level).

![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/c/7/c77d5f5670e7b56b2153cd79bfe89d5fe437b1fd.png)

The main problem is that I have 400 link instances, but you made me think to find a solution out of Dynamo and I have it: every link instance has a room in it, so I will take the level from there.

Thanks again for your time! 😀
