# Change mark element by level with prefix

**URL:** <https://forum.dynamobim.com/t/change-mark-element-by-level-with-prefix/5503>\
**Category:** Revit\
**Created:** [August 8, 2016, 4:13pm UTC](https://forum.dynamobim.com/t/change-mark-element-by-level-with-prefix/5503 "2016-08-08T16:13:37Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![DannySimon](https://avatars.discourse-cdn.com/v4/letter/d/ecd19e/32.png) [@DannySimon](https://forum.dynamobim.com/u/DannySimon)\
**Post date:** [August 8, 2016, 4:13pm UTC](https://forum.dynamobim.com/t/change-mark-element-by-level-with-prefix/5503/1 "2016-08-08T16:13:37Z")

</div>

Hi,

I´m new on using the Dynamo but already make some research to try this one.

The goal is to filter structural elements by level (collumns or beam) —\> pick the mark id that revit gives for each element —\>then enchange by mark that autonumbering with prefix.

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

Then i think by copy the script for other level could work?

Is it possible to do it all once? get all beams then filter by level, take the mark and exchange it with prefix+autonumber on each level?

Or need to just be able to take the mark to excel file and exchange there to import again to revit?

Can someone help me?

Thanks & regards

---

<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:** [August 8, 2016, 5:07pm UTC](https://forum.dynamobim.com/t/change-mark-element-by-level-with-prefix/5503/2 "2016-08-08T17:07:32Z")

</div>

Unfortunately beams does not have Level but Reference Level as paramter,  
 ![](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/2X/5/5f038a0e106a75d7665d2b662424b45f7a585c6c.png)

Is this what you are looking for?

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

[setMarkValueForBeamsPerLevel.dyn](https://forum.dynamobim.com/uploads/short-url/prgMe9TQChiAjv0DMUIgNBOOjom.dyn) (5.6 KB)

---

<div class="post-metadata">

**Author:** ![DannySimon](https://avatars.discourse-cdn.com/v4/letter/d/ecd19e/32.png) [@DannySimon](https://forum.dynamobim.com/u/DannySimon)\
**Post date:** [August 8, 2016, 7:47pm UTC](https://forum.dynamobim.com/t/change-mark-element-by-level-with-prefix/5503/3 "2016-08-08T19:47:34Z")

</div>

Thanks Einar\_Raknes for fatest reply…

i have tried and it´s almost that… I see below the code block that the “group of list” on {1}list i think it´s level 1 for example… there i should be able to change the prefix to B1.xx… on level 2 start with B2.xx…

that´s why i´m thought filter by level on my… but i´m a noobie on this… probably i should copy this script on 5 rows if i have a building with 5 levels for example… ?

Thank you a lot for helping me on this… 😉

---

<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:** [August 8, 2016, 7:57pm UTC](https://forum.dynamobim.com/t/change-mark-element-by-level-with-prefix/5503/4 "2016-08-08T19:57:46Z")

</div>

No problem DannySimon, I don’t know how you name your levels, but in my case something like this would work:

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

[setMarkValueForBeamsPerLevel.dyn](https://forum.dynamobim.com/uploads/short-url/wamUYj8czxNGia1kLlfslkGzRNw.dyn) (8.5 KB)

---

<div class="post-metadata">

**Author:** ![DannySimon](https://avatars.discourse-cdn.com/v4/letter/d/ecd19e/32.png) [@DannySimon](https://forum.dynamobim.com/u/DannySimon)\
**Post date:** [August 8, 2016, 9:23pm UTC](https://forum.dynamobim.com/t/change-mark-element-by-level-with-prefix/5503/5 "2016-08-08T21:23:58Z")

</div>

Almost done… 99%… you done it better then i expected.

Just need to add “.” between the B1. xx … As you can see on the picture. for level 1 (plan 1) the number starts from “11”… that can induce that i forgot the number B1.1 to B1.10… i know why this happen but i don´t know how to add the (“point” “.”) between them.

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

The rest work very well… is just level 01 that can make this understanding on the project.

It´s very cool what you have done… thanks a lot seriously!

---

<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:** [August 8, 2016, 9:28pm UTC](https://forum.dynamobim.com/t/change-mark-element-by-level-with-prefix/5503/6 "2016-08-08T21:28:38Z")

</div>

Just add +"."+ to the code block like this:  
`"B"+levelNumber+"."+(1..count);`

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

---

<div class="post-metadata">

**Author:** ![DannySimon](https://avatars.discourse-cdn.com/v4/letter/d/ecd19e/32.png) [@DannySimon](https://forum.dynamobim.com/u/DannySimon)\
**Post date:** [August 8, 2016, 9:32pm UTC](https://forum.dynamobim.com/t/change-mark-element-by-level-with-prefix/5503/7 "2016-08-08T21:32:25Z")

</div>

Work it Einar\_Raknes… thanks a lot 😉 i own you a 🍺

---

<div class="post-metadata">

**Author:** ![Bach](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/bach/32/35892_2.png) [@Bach](https://forum.dynamobim.com/u/Bach)\
**Post date:** [August 24, 2017, 3:31am UTC](https://forum.dynamobim.com/t/change-mark-element-by-level-with-prefix/5503/8 "2017-08-24T03:31:11Z")

</div>

So good!We can reduce so many time beam mark after use this dynamo

---

<div class="post-metadata">

**Author:** ![Bach](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/bach/32/35892_2.png) [@Bach](https://forum.dynamobim.com/u/Bach)\
**Post date:** [August 26, 2017, 4:33am UTC](https://forum.dynamobim.com/t/change-mark-element-by-level-with-prefix/5503/9 "2017-08-26T04:33:51Z")

</div>

I used it and found it really helpful, and I want you to help me one more thing to perfect it is under the image below I would like to beam B2-5 and B-26 alike and it must The same name is B2-5 because it’s the same form and length!Please for me solution

 ![1](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/8/2/821324343ab72b2b85c7f1bc508e2c327d83a630.PNG) ![2](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/2/e/2e3cd02ff4510a9c86d5ce2a1514d40816f1eed4.PNG)
