Create multiples levels at once from excel sheet

Hello,
I didn’t find anything on this subject yet so i’m asking here.

I would like to create multiples levels in revit from an excel sheet at once.
I succeded doing it for 1 level and i would love to hear your suggestions without having to manually copy/past the last part as many time as the number of level.

My questions are the following :

_ Is there a nodes allowing list to creat multiples levels ?
_ Is there a way to use codeblock in order to repeat the last step (i’m not good at coding unfortunately) ?

Looking forward to your response,
thanks!

Dynamo - Create level|690x298

(This is my first time using this forum, it seems i cant attach my code, feel free to tell me if i’m doing something wrong.)

Hi there,

Below is posted 2 screenshots, the first is with the nodes to make you understand whats happening, in the second it is done with a code block.


data = Data.ImportExcel(file,"Blad1", false, true);
t1 = List.RestOfItems(List.Transpose(data)@L2<1>);
t2 = List.GetItemAtIndex(t1, 1);
t3 = List.GetItemAtIndex(t1, 0);
level = Level.ByElevationAndName(t2, t3);

Hope this helps, Danos

Hi Danos,

I tried it and it works very well, thanks you very much for your help !

You’re welcome, happy to help!

You may also want to look at Dynamo Primer to get a better understanding of how to handle certain problems with lists and so https://primer.dynamobim.org/

1 Like