# Sort Revit levels by specific order

**URL:** <https://forum.dynamobim.com/t/sort-revit-levels-by-specific-order/4385>\
**Category:** Revit\
**Tags:** revit\
**Created:** [June 7, 2016, 6:06pm UTC](https://forum.dynamobim.com/t/sort-revit-levels-by-specific-order/4385 "2016-06-07T18:06:27Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Renzoj14](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/renzoj14/32/49196_2.png) [@Renzoj14](https://forum.dynamobim.com/u/Renzoj14)\
**Post date:** [June 7, 2016, 6:06pm UTC](https://forum.dynamobim.com/t/sort-revit-levels-by-specific-order/4385/1 "2016-06-07T18:06:27Z")

</div>

Hello All,

I am trying create a definition that generates plan views based on project levels. All works well apart from the order in which Dynamo generates the views.

I’d like dynamo to generate my views starting from foundation level, B2, B1 and so on. Is there a way this can be achieved??

many thanks

 ![](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/2X/5/522e7e806ce90fc130fb22d80b9052f21187276b.png)

---

<div class="post-metadata">

**Author:** ![Thomas\_Mahon](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/thomas_mahon/32/64209_2.png) [@Thomas\_Mahon](https://forum.dynamobim.com/u/Thomas_Mahon)\
**Post date:** [June 7, 2016, 7:36pm UTC](https://forum.dynamobim.com/t/sort-revit-levels-by-specific-order/4385/2 "2016-06-07T19:36:55Z")

</div>

Yes, extract the elevation of each Level then sort by key using the elevations.

---

<div class="post-metadata">

**Author:** ![Einar\_Raknes](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/einar_raknes/32/8566_2.png) [@Einar\_Raknes](https://forum.dynamobim.com/u/Einar_Raknes)\
**Post date:** [June 7, 2016, 7:39pm UTC](https://forum.dynamobim.com/t/sort-revit-levels-by-specific-order/4385/3 "2016-06-07T19:39:29Z")

</div>

SortByKey or SortByFunction

 ![](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/2X/c/cfd984b40e8b3a24ecd5e7755782723d36a35983.png)

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

---

<div class="post-metadata">

**Author:** ![Renzoj14](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/renzoj14/32/49196_2.png) [@Renzoj14](https://forum.dynamobim.com/u/Renzoj14)\
**Post date:** [June 7, 2016, 10:12pm UTC](https://forum.dynamobim.com/t/sort-revit-levels-by-specific-order/4385/4 "2016-06-07T22:12:25Z")

</div>

Thank you guys!

I used _SortByFunction_ as the next node is a single input node.

thanks again!
