I have a statement that reverses a List case false.
The problem is the result is restricted to the first element of the above-mentioned list, in this case, a sublist.
I have tried both the if node or a Code Block with a conditional statement and the result is identical.
I managed to achieve the correct result with a Python node, but isn’t that bug?
Why would the node change the data input? Should be just a workflow tool.
And there is no Lacing option for this node either.
Well thanks guys.
@lucaspfmoreira dont exactly know what you are trying to do but maybe this helps:
I am just selecting either one based on a test.
if True pass the list, if false the reversed list.
@lucaspfmoreira the conditional does not work when the list have different lengths. is this the case?
If so in a Python Script node type the following:
Hi, both lists are the same but one is reversed.
For IF statements of different list lengths or complicated list structure you can use a little trick to return an index instead of the actual list. Then use that index to return the appropriate list.
So what’s the error? Can you upload your dyn and rvt files(or post a link)
the error is “Both lists have 207 items, but after passing the if node only the first sub-list remains with 4 items”.
I appreciate the help, but I’ve already solved it with Python.
tList = IN
test = IN
OUT = reveserd(tList)
OUT = tList