Hi, Can anyone help me with a work around for this to take the element when true. Also when theres an element in the empty I want it to take that one when its false.
The IF often fails when the 2 “answers” are of a different rank (ie a list and a value), it’s a lot more predictable when both items are lists or just 2 single items.
I believe you could also use the ‘Scope if’ node when working with empty lists
The normal if node does not handle empty lists inputs correctly, the scopeif node does.
Via Design Script:
indx = DSCore.List.IsEmpty(a) ? 0 : 1 ;
rslt = [a,b][indx];
Thank you for the replies but still need a little more help please
This worked but not for going the other way around.
My dynamo dosn’t quite agree with the scope if node. I gave it a go before but it did odd things like corrupts the script then id have to copy the script to a new script for it to work again.
I’m probably not implementing the design script correctly…