Change parameters in a list

Hi everyone,
i try to make a list with the elevation level parameter for all elements in my project.
I use “Element.Level” to obtain the level of my element and then i try to extract the “elevation” parameter.


so i try to flat my list, it works, but dynamo delete all empty list

i need the empty list because i have to associate the “elevation” parameter whit the “ID” element!
How can i do?

i want something like this


List.ReplaceEmptyList is from Clockwork package

i don’t want replace empty list, i want replace the compiled list whit part of what there is write in it.

For example:

empty list
level(name=P00, elevation= 142)
level(name=P01, elevation= 442)
empty list

replace whit this:

empty list
empty list

it can’t work…
i have strings whit different lenght

i was afraid off that :wink:

i have almost another option ready

Can you give more information on what your overall goal is? There may be a better solution.

i want a new list that contains only the value of “elevation” and the “empty list” like this:

But what are you trying to do with your information? Are you trying to get the element’s offset from level? Are you trying to sort elements by elevation or level? What categories are you looking at?

The more information we have the more help we can be.

My guess: The empty list elements don’t have a level, so they won’t pull this parameter so you won’t have a level to write anyway. If you can’t use an empty string to cause excel to not report the level, you have some options.

I recommend filtering the empty lists out of the list, and processing the included set and the excluded set separately I find a nearby level (perhaps via element location).

You could also use a scope if node.

My guess is that you have a bunch of data there so things may be slow processing - may be better to use something light or process them in chunks.

Can you confirm how you have selected everything? An overall camera export at a legible read distance would help.

I extract all category from my project and then all elements. i’m determining if an element belongs to a level considering also his offset

and so on for many other paramenters…

You might want to consider a different way of selecting all your elements. I assume you only want model categories (but I could be wrong). You’re definitely going to get a lot of extra elements that won’t have levels or other parameters by doing it this way. Python seems like your best option.

try something like this

i get null but with youre empty list you can do the same

Nick_Boyts is right that python is a better option for this kind of problem.

i have some problems… :frowning:
List.getitemIndices is an empty list and Level.Elevation don’t work…

Replace the node Object.isNull for the node List.IsEmpty it will give you true and false

in mine example i had nulls en not empty list