# Align MEP families to different Ceilings in Linked model

**URL:** <https://forum.dynamobim.com/t/align-mep-families-to-different-ceilings-in-linked-model/53610>\
**Category:** Revit\
**Tags:** revit, mep, python, dynamo\
**Created:** [July 31, 2020, 2:11pm UTC](https://forum.dynamobim.com/t/align-mep-families-to-different-ceilings-in-linked-model/53610 "2020-07-31T14:11:06Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![milos.sumenkovic](https://avatars.discourse-cdn.com/v4/letter/m/e9c0ed/32.png) [@milos.sumenkovic](https://forum.dynamobim.com/u/milos.sumenkovic)\
**Post date:** [July 31, 2020, 2:11pm UTC](https://forum.dynamobim.com/t/align-mep-families-to-different-ceilings-in-linked-model/53610/1 "2020-07-31T14:11:06Z")

</div>

Hello,

I want to Allign MEP families (in my case - Air Terminals) to Linked Arch model when the model changes. I managed to use your helps on the forum to list the heights of the suspended ceilings as well as all the Air Terminals that I want to align (I filtered the Air Terminals which is hosted to ceiling).

Does anyone know how to complete the script?

Thank you…

 ![Dynamo Qestion](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/9/9/99832968db8a41a5c27c7f2ddbf94b00f57b5cb2.png)

---

<div class="post-metadata">

**Author:** ![danielU3R39](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/danielu3r39/32/97504_2.png) [@danielU3R39](https://forum.dynamobim.com/u/danielU3R39)\
**Post date:** [July 31, 2020, 3:50pm UTC](https://forum.dynamobim.com/t/align-mep-families-to-different-ceilings-in-linked-model/53610/2 "2020-07-31T15:50:35Z")

</div>

Hi,

This looks good & you are very close! You just need to work out which elements are in which room. If this sound daunting, I suggest starting of with a POC, and looking at one room and only the air terminals in that room.

After that it’s just a case of ending the script with a set parameter node.

---

<div class="post-metadata">

**Author:** ![milos.sumenkovic](https://avatars.discourse-cdn.com/v4/letter/m/e9c0ed/32.png) [@milos.sumenkovic](https://forum.dynamobim.com/u/milos.sumenkovic)\
**Post date:** [August 7, 2020, 1:34pm UTC](https://forum.dynamobim.com/t/align-mep-families-to-different-ceilings-in-linked-model/53610/4 "2020-08-07T13:34:08Z")

</div>

Thank you Daniel, do you have any solution how I can do that?

---

<div class="post-metadata">

**Author:** ![danielU3R39](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/danielu3r39/32/97504_2.png) [@danielU3R39](https://forum.dynamobim.com/u/danielU3R39)\
**Post date:** [August 8, 2020, 5:44pm UTC](https://forum.dynamobim.com/t/align-mep-families-to-different-ceilings-in-linked-model/53610/5 "2020-08-08T17:44:39Z")

</div>

One option is to find all the air terminals and ceilings within each “room”, and then find the heights of those ceilings. This will give you grouped results that can be matched together.

Alternatively, you can use an example by Sean fruin, where he uses dynamo lines from the air terminal up to the ceiling, and where it intersects the ceiling, it will provide the height and respective ceiling element

---

<div class="post-metadata">

**Author:** ![matthew\_woodward](https://avatars.discourse-cdn.com/v4/letter/m/dc4da7/32.png) [@matthew\_woodward](https://forum.dynamobim.com/u/matthew_woodward)\
**Post date:** [October 31, 2020, 4:53pm UTC](https://forum.dynamobim.com/t/align-mep-families-to-different-ceilings-in-linked-model/53610/6 "2020-10-31T16:53:13Z")

</div>

I am running into a similar issue as Milos although I believe I may be utilizing the dynamo lines intersection method that you mentioned danielU. I believe that the script is close to 99% as when I substitute a constant value for the variable Offset\_= under the “//Get Offset from Hosted Level” section the script runs and moves all the air terminals to that value. The generated lines are also visible in Revit when I run the script so I know they are being created successfully. It seems to me that the issue is somewhere with either a) the ceiling intersection point not being properly created or b) the intersection point not being read as the variable Offset\_=. Can anyone shed any light on where the issue might be?

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

The inputs are all elements of categories Air Terminals, Ceilings, and Levels.

---

<div class="post-metadata">

**Author:** ![matthew\_woodward](https://avatars.discourse-cdn.com/v4/letter/m/dc4da7/32.png) [@matthew\_woodward](https://forum.dynamobim.com/u/matthew_woodward)\
**Post date:** [October 31, 2020, 4:53pm UTC](https://forum.dynamobim.com/t/align-mep-families-to-different-ceilings-in-linked-model/53610/7 "2020-10-31T16:53:53Z")

</div>

The image below is a section view from Revit showing the created dynamo line.

![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/8/9/89c2c5228d542bb7fd91a11ff3c8977d42c80ef4.png)
