IF node gives empty list


#1

Hey,

What is wrong?


#2

Well, you are putting an empty list into the if statement and formula nodes.


#3

Yes. That is the false case. In true case i need the list outputted which is not happening.
I disconnected the empty list, still the same.


#4

If statements don’t handle well Empty Lists. Changing it to a null value will work, but it will throw a warning on the SetParameter node if your If is false.


#5

@alvpickmans is correct. If statements can’t handle Empty Lists. You’ll have to use null or another value if you use DesignScript or nodes. Your other option is to use Python to force an Empty List.


#6

Use ScopeIf. If that doesn’t work, use ScopeIf+ from Clockwork.


#7

Looks like the OOTB If node doesn’t like differing length lists as results. After reading the following post, I’ve used the Logic.If node from the Zebra package with no issues in list lengths.