# Simplifying graph\_multiple level change

**URL:** https://forum.dynamobim.com/t/simplifying-graph-multiple-level-change/84927
**Category:** Revit
**Created:** [January 13, 2023, 6:36am UTC](https://forum.dynamobim.com/t/simplifying-graph-multiple-level-change/84927 "2023-01-13T06:36:46Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![jmark](https://avatars.discourse-cdn.com/v4/letter/j/e0b2c6/32.png) [@jmark](https://forum.dynamobim.com/u/jmark)
#### Post date: [January 13, 2023, 6:36am UTC](https://forum.dynamobim.com/t/simplifying-graph-multiple-level-change/84927/1 "2023-01-13T06:36:46Z")

</div>

![set level ht_multiple](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/c/f/cfc98e679f1c7fba6d305bcee98421e070dc3819.jpeg)

how can i simplify this graph without basically repeating the first process the i’d want. it is basically working but i feel like i can still improve this.

so my firm suddenly decided to change the level height of the building and i’d need to update multiple models. I’d want to put it on dynamo player so i can ask help from the juniors to do it on the other files.

my question is, is there a more intuitive way to do this?

---

<div class="post-metadata">

### Author: ![Kai](https://avatars.discourse-cdn.com/v4/letter/k/cc9497/32.png) [@Kai](https://forum.dynamobim.com/u/Kai)
#### Post date: [January 13, 2023, 7:17am UTC](https://forum.dynamobim.com/t/simplifying-graph-multiple-level-change/84927/2 "2023-01-13T07:17:49Z")

</div>

Hi @jmark ,  
Something like this could work…assuming level shift is constant.

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/0/b/0b872c51e7c2862634b35875f5225ca088473e69.png)  
Cheers Ks

---

<div class="post-metadata">

### Author: ![jmark](https://avatars.discourse-cdn.com/v4/letter/j/e0b2c6/32.png) [@jmark](https://forum.dynamobim.com/u/jmark)
#### Post date: [January 13, 2023, 9:30am UTC](https://forum.dynamobim.com/t/simplifying-graph-multiple-level-change/84927/3 "2023-01-13T09:30:47Z")

</div>

Hi @Kai thank you! I don’t know yet if the designers are trying to move everything up on a constant distance but I will take note of this. what am i anticipating is that it probably might me be a constant distance so I’m trying to prepare.

btw, tried your script, but unfortunately when you run it, even the Level 0 will move up by 1000.

---

<div class="post-metadata">

### Author: ![Kai](https://avatars.discourse-cdn.com/v4/letter/k/cc9497/32.png) [@Kai](https://forum.dynamobim.com/u/Kai)
#### Post date: [January 13, 2023, 10:10am UTC](https://forum.dynamobim.com/t/simplifying-graph-multiple-level-change/84927/4 "2023-01-13T10:10:33Z")

</div>

Hi @jmark you will need to filter it out by either name or level value.  
One example is as per attached, then use that as the list of elements.

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/2/3/2379cee7cd2ec569194da3ceb365fafc1fea7b63.png)  
Also make sure graph is set to manual. 🙂  
Cheers KS

---

<div class="post-metadata">

### Author: ![jmark](https://avatars.discourse-cdn.com/v4/letter/j/e0b2c6/32.png) [@jmark](https://forum.dynamobim.com/u/jmark)
#### Post date: [January 16, 2023, 2:17am UTC](https://forum.dynamobim.com/t/simplifying-graph-multiple-level-change/84927/5 "2023-01-16T02:17:05Z")

</div>

![set level ht_multiple_2](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/2/5/25f79df34ff9255c098776e0fba43d651ff55629.jpeg)  
hi @Kai thanks, for your patient reply, tried the method you showed but i don’t think it is working for me, can you tell me what’s wrong with my graph? basically I just wanted the level 0 to stay as 0 then everything else should go up by 1000 but it seems like it doesn’t do trick. many thanks!

---

<div class="post-metadata">

### Author: ![Kai](https://avatars.discourse-cdn.com/v4/letter/k/cc9497/32.png) [@Kai](https://forum.dynamobim.com/u/Kai)
#### Post date: [January 16, 2023, 4:06am UTC](https://forum.dynamobim.com/t/simplifying-graph-multiple-level-change/84927/6 "2023-01-16T04:06:02Z")

</div>

Hi @jmark put a list.flatten node after the boolean mask should do the trick… not entirely sure what’s going on with your list structure in the filter.byboolmask, but load your basic file up and ill be happy to have look.  
Cheers KS

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

---

<div class="post-metadata">

### Author: ![GavinNicholls](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/gavinnicholls/32/190442_2.png) [@GavinNicholls](https://forum.dynamobim.com/u/GavinNicholls)
#### Post date: [January 16, 2023, 4:42am UTC](https://forum.dynamobim.com/t/simplifying-graph-multiple-level-change/84927/7 "2023-01-16T04:42:58Z")

</div>

Looks good to me!

@jmark to lend my 2 cents, generally moving levels is a heavy exercise unless very few objects are associated to them. I’d suggest considering not automating such a task if it’s later in a job, as the script might be getting tripped up on aspects related to the move; for example:

Level 1 = 3000  
Level 2 = 6000  
Level 3 = 9000

Script moves all levels up, say 3000

First, Level 1 3000 \> 6000

Level 1 and Level 2 will temporarily be the same, and all walls on Level 1 will want to delete themselves before Level 2 gets a chance to move (I think). Whilst generally this may not happen, Levels are retrieved from Dynamo from the earliest to latest made element, so you might sometimes get levels in between others moving before later ones in elevation (unless you sort them by elevation first).

---

<div class="post-metadata">

### Author: ![jmark](https://avatars.discourse-cdn.com/v4/letter/j/e0b2c6/32.png) [@jmark](https://forum.dynamobim.com/u/jmark)
#### Post date: [January 17, 2023, 1:13am UTC](https://forum.dynamobim.com/t/simplifying-graph-multiple-level-change/84927/8 "2023-01-17T01:13:43Z")

</div>

thanks for the input! it is generally what’s happening when i do that. guess i’ll just stick with that simple graph i came up with. thanks again!

---

<div class="post-metadata">

### Author: ![jmark](https://avatars.discourse-cdn.com/v4/letter/j/e0b2c6/32.png) [@jmark](https://forum.dynamobim.com/u/jmark)
#### Post date: [January 17, 2023, 1:16am UTC](https://forum.dynamobim.com/t/simplifying-graph-multiple-level-change/84927/9 "2023-01-17T01:16:08Z")

</div>

thanks for the effort again kai. like what Gavin has mentioned below, it is ending up on the same level as above thus overlapping, i’ll just stick with my simple graph for now. i just thought there’s a “pythonic” way to do this like the python users always say. 🙂

---

<div class="post-metadata">

### Author: ![GavinNicholls](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/gavinnicholls/32/190442_2.png) [@GavinNicholls](https://forum.dynamobim.com/u/GavinNicholls)
#### Post date: [January 17, 2023, 1:22am UTC](https://forum.dynamobim.com/t/simplifying-graph-multiple-level-change/84927/10 "2023-01-17T01:22:30Z")

</div>

If you still want to try it in a safer manner, move the highest level up first and sort each by highest to lowest from there. That way as your levels get bumped up, they will always be higher than that below. The opposite applies to level reduction.
