Syntax in levels using code blocks

is there a way to achieve the follow using just the code block?

1 Like

The correct syntax for levels is <n> for the nth level list. I don’t think it works with the “shorthand” version of list[n] but you can use GetItemAtIndex to do the same thing: DSCore.List.GetItemAtIndex(list<2>,0);

1 Like

I also use Node 2 Code a lot to learn the syntax.


Select the nodes you want to make a code block, right click the background, and select “node to code”.

1 Like

1 Like

Thanks guys,
I was after a shorthand for this, but apparently there is no way to avoid the use of List.GetItemAtIndex.

Hey guys, quick taught on this : If I am right you want to get all the items at index zero for each list. A short hand for each one of them is Lst[listindex][objectindex] so :


The 0, 1, 2… are basicly the list length right?

You could probably shorthand this with something like
L= 0…(len(lst)-1))
YourItems = Lst[L][0]

I on my phone can’t check if this works but design script usually accepts list of integer replacing integer value and just repeats the process.

If it does not work go in imperative mode with [imperative] in the code block and try a python–like script with a “for” loop based on a list of index.

All the best