# Natural sort Elements by Name

**URL:** <https://forum.dynamobim.com/t/natural-sort-elements-by-name/72841>\
**Category:** Revit\
**Created:** [February 1, 2022, 3:07pm UTC](https://forum.dynamobim.com/t/natural-sort-elements-by-name/72841 "2022-02-01T15:07:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![gerhard.p](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/gerhard.p/32/147675_2.png) [@gerhard.p](https://forum.dynamobim.com/u/gerhard.p)\
**Post date:** [February 1, 2022, 3:07pm UTC](https://forum.dynamobim.com/t/natural-sort-elements-by-name/72841/1 "2022-02-01T15:07:01Z")

</div>

Hello Dynamo Community 🙂

I want to natural sort Lists of Elements by a parameter. For example Levels by names.

I can natural sort the parameters, but how can i now sort the elements in the same way?

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

And another problem i have is that the natural sort will sort the negative values after the positive ones. I would like to switch that somehow:

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

Thanks in advance for any advice!

kind regards

---

<div class="post-metadata">

**Author:** ![Daan](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/daan/32/82246_2.png) [@Daan](https://forum.dynamobim.com/u/Daan)\
**Post date:** [February 1, 2022, 3:29pm UTC](https://forum.dynamobim.com/t/natural-sort-elements-by-name/72841/2 "2022-02-01T15:29:39Z")

</div>

Hi @gerhard.p ,

Something like this should answer both your questions 😃

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

---

<div class="post-metadata">

**Author:** ![gerhard.p](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/gerhard.p/32/147675_2.png) [@gerhard.p](https://forum.dynamobim.com/u/gerhard.p)\
**Post date:** [February 1, 2022, 4:32pm UTC](https://forum.dynamobim.com/t/natural-sort-elements-by-name/72841/3 "2022-02-01T16:32:50Z")

</div>

Works great 😃

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

Thank you for taking the time @Daan 🙂
