Codeblock Help

I’m new to design script so please bear with me. This might be a simple task. I’m trying to feed the List.GetItemAtIndex with numbers running in a loop. In the codeblock which clearly is wrong i want (i1) as the count of list in the graph. And i starts from 0 to (i1) and retrun number at every iteration and feeds to List.GetItemAtIndex.

Any input would be great.
Thank you!

Hi @Rooney_Wayne ,

Just to make sure I understand well, you want to create ranges going from 0 to “i1” where i1 is a list of numbers?

no “i1” is a count from a list. For example the list has 8 numbers so “i1”=8. So 0 to 8. I hope this will help you.

Something like this ?

1 Like

Thanks for the input, Now i learned where i made mistakes. But what i’m trying to do is run the script for x amount of iterations based on a count in a list. The codeblock should return a number(increment) every time instead of a range like you showed. I will try to use yours and modify to fit my purpose. if you can also point me to a how to for code blocks that would be great. thank you!

an example of input list and the expected output would help understanding better :smile:
the forum has some interesting topics where imperative blocks are discussed. Here are a few:

1 Like