Create levels from newly created reference level

Hi all, I am trying to create levels by elevation from a newly created reference level but it is not working. It always takes the existing one. Please let me know how to create levels by the new reference level as shown in the picture?

Thanks in advance

Maybe show parts of your Graph (.dyn)?

Yeah sure @bvs1982 here is the graph
Parametric Levels.dyn (124.4 KB)

Also a bit more info would be appreciated. Like what did you use for making your Reference level?

Sorry my mistake @bvs1982 . I am taking help of excel sheet to create levels

here is the sheet

Grids data.xlsx (9.2 KB)

Still an image of your Graph would be useful. :upside_down_face:
Many people here can assist with just an image. People don’t allways have access to Revit and / or Dynamo.

@bvs1982 here it is

I will have a look later. Missing some packages. Maybe someone else has an answer before me.
I also thought your Graph would be a bit simpler ;). I think people could also use a Sample Project.

PS
Do you run this Graph using Dynamo or Dynamo Player or some other tool?
Also your workflow is a bit unclear to me. There is this Excel and people have to pick a Level?
Not to mention the Python. So i think you might need to provide more information so people can help you better.

Okay Thanks @bvs1982

I got the solution.

I need to use Element.Setparameterbyname node after creating the levels. Then it works fine for what I was expecting.

Thanks for your time. I really appreciate it.