How to replace nested empty lists


#1

hello, I dont seem to be able to isolate nested empty lists at all. I think the problem is that when i tried to project these points onto this plane, some of them were on the wrong side of the plane, and therefore couldnt get projected along this normal vector, however if i reverse the normal vector and patch the original list with the items found by reversing the vector, I should be able to get one complete list, however, everything I try refuses to let me isolate and replace the empty lists. What am I doing wrong? Please advise. Thanks


#2

There is a node called Empty.List in the core nodes. Try using that instead of the typed string “empty list” in your Contains.Item node, and it might pay to play with the list levels of that node as well if it doesn’t work straight away.


#3

You mean List.IsEmpty? I dont have a node called “Empty.List”. This is the best I can get with this node, it replaces the Empty list with null, out of the frying pan and into the fire. lol


#4

The node is called List.Empty, but anyway…
I think you want List.IsEmpty to use @L2. That’s where your Empty Lists show up.


#5

maybe you guys are using a different version of dynamo than me maybe. Here is what my Core section looks like…


#6

It’s shown as just Empty.
What version of Dynamo are you on?


#7

image
Now we are getting somewhere!
Oh ok, yeah I dont have List.Empty either.


I am using Dynamo 1.3.2
image


#8

It’s called List.Empty but shows up as only Empty. If you search for it it will show up.
It’s under Queries for some reason.


#9

You mean this one? how can I use this to find my empty nested lists?
image


#10

It’s just another Empty List so you can use it to compare against your other values, but List.IsEmpty is a much better solution in this case.

You can also use {}; instead of the List.Empty node.