I have a set of values for which I want a list each of x number of value (in the image below, 3 increasing values). My list levels goes to @3 which I want to get down to @2 as later on in the script the additional level causes problems
In the above image, from the watch node I want each of the 7 values to increase by the values from the range node (in this case by 3x new values) without getting the additional list level @3. When flattening the list it flattens to much, I have to keep the list in sets of 3 for later on in my script.
After the flatten node I can probably make the sub-lists again every 3 values (I have this from a count node earlier in the script) but I assume I can create the sub-list of increasing values another way without the additional @3 level?
I am not a master of this by anyones gauge, but my understanding is that a list of lists are enclosed in another list.
You may be able to try the reverse of what you are trying to achieve and instead chop your flat list into a list structure that matches the sublist of the other list so you can pass it through your code block.
I think that a list containing one level worth of sublists (as you show) will always be level 3? Or am I wrong? Flattening by one level will always result in a single level 2 list containing all the values.
Can you show more of your graph? That would help.
And maybe i am missing something but “flatten while keeping the sublist”
as shown in your image under the List.Flatten node will get you a list like
you shown under de + node.
EDIT
Now i think of it. You might need List.Join and NOT List Create at the end and / or
create a list from the list(s) with the least levels first.
With a list create there are no extra levels, one list per input is what you get.
In the end it didn’t matter I had those extra levels as the script worked as I wanted it to in the later stages, I was foreseeing problems that didn’t exist.