Hi,
i`m trying to make a loop based on selected items, everything works fine, but it performs loop on first item twice. Is it because list command runs simultaneously or before loop? If i run it trough Data than it only loops first item.
if you are setting a number of cycles and your loop is based solely on that, then you can avoid triggering the Stop Boolean
consider that for a List of N items you’ll need N-1 repetitions (because first iteration is #0)
also, if you plug a False bool here, when you plug an index bigger than list length it won’t return any element
Thanks, used your method for repetitions.
I think that problem with duplicated first item is here, because list runs before loop and then with loop, and that causes list item 0 to run twice. Can i add some delay or maybe counter can trigger list command?
If you had posted your code, someone could have shown you how to code the Anemone loop.
3. Attach minimal versions of all the relevant files
List length counts the number of items in your list
if you have N items, List Length will return you N as a result
if you List Item at index N, you will get the first item, because the last item has index N-1, so item at index N is the first -if Wrap is True-
and it’s Null if Wrap is False
something similar is happening with your Anemone Loop: you use the output Counter as if it was starting from 1, but first iteration is 0, then it repeats List Length times
the easiest way to fix the problem is to give a number of repetitions as List Length - 1, and get rid of the whole “exit loop” condition
yes, i understood that there may be issues with 0, but it seems to loop correctly, but still, first item on the lists runs twice and that might be because i bypass loop and connect selected objects straight to the list.
Maybe there`s other option to run trough index values in list, without a loop? Just a counter, no loop? That might work too in my case.
Joseph_Oster, i didnt share code because after a loop i use Tekla drawing link components, and it wouldn
t run anyways for those who doesn`t have it.
I thought it will be ok just with the loop screenshot, because problem seems to be there.
Poor excuse. This is about Anemone, not Tekla.
you might find alternative solutions with code, maybe involving some Stop/Pause timer between items [edit] GHPython-counter from 0 to a value - #3 by AndersDeleuran [/edit]
but trying to redo your file, it does not happen on my PC that any item is repeated twice, not at the Data output of the Loop, not at the List Item directly:
ABCD_Loop.gh (12 KB)
I am not able to reproduce the problem you are encountering