Simplifying graph_multiple level change

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?

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


Cheers Ks

1 Like

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.

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.


Also make sure graph is set to manual. :slight_smile:
Cheers KS


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!

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

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).

1 Like

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!

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. :slightly_smiling_face:

1 Like

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.

1 Like