CBN and list processing

listhow do i access 1 element in a sulist for all sublists using a CBN?

i am missing a solution.

my results always deliver a list of lements not a single element

what i expect:

for list[0…3][2]

meaning for all sublists 0…3 return element [2]

up to now i only receive a gain a sublist like [0…3]

meaning returns all elements of the sublist

It would be quite interesting to know how to do this without using a DS function. In any case the functions normally allow to solve this issues quite smoothly

01

eduardo, thanks a lot. CBN actually is very efficient!

up to now i used python to solve that.

import clr
clr.AddReference(‘ProtoGeometry’)
from Autodesk.DesignScript.Geometry import *

outlist=[]
inlist=IN[0]
for i in inlist:
outlist.append(i[1][0][2]) # that is a known list structure
#Assign your output to the OUT variable
OUT = outlist

 

Peter, the request for lists to work with arrays in the brackets other than the last like list[0…3][2] is currently in the backlog. I’m looking forward to that too!

This is also similar to the topic How do I extract the first value out of a nested list.