Tag wall opening using dynamo

Hello guys,

I have recently come across a blogpost (https://bim42.com/2016/05/wall-openings-again/) which showed me how to tag a wall opening with the bottom and top elevation.

I´ve done the exact same steps with my project but it does not run correctly.

My question here is where can I find the schedule level and how to work with it in dynamo to get the top elevation?

The picture shows you my written script

Thanks for the attention

What is the error? I believe that the schedule level he mentions in the post is a revit parameter.