Hi,
I am trying to get items from a list, based on the index values. Instead of using the complete list, I want to work with index [0], perform some analysis, and repeat the steps for other index values till the condition is met.
I tried using the while loop, but the analysis is performed only at the last index. Here in the example, it is [3].
So, I have a list (that may contain multiple items - no static value). From that list, I want to extract the item at index 0, and run the dynamo script. After, finishing the index 0, I want to repeat the steps for other items in the list. As far as I know, dynamo will automatically check the whole list. But, in my case, the analysis contains user input, so each item in the list should run separately. Its a kind of iterating through lists. So, I though using while loop may help.
You wonât be able to inject any user interaction between items within a single list. The whole node will have to execute before anything else can be done. You might be able to determine this interaction before running the node. Weâd need more information on exactly what youâre trying to do.
Based on what youâve shown I think you can just let Dynamo handle the iterating itself. If youâre not doing anything different at each index then itâs the same process every time. You just have to handle the list structure.
Yes, I will organise the list structure and try this way.
In addition, are there any options available to request dynamo to go step by step? I am concerned because, in the end, the user will be selecting a material of their choice, and so I donât want to create confusion by providing them with multiple material types at the same time. If it was one material, the user can track its properties easily and make selections promptly.
So, it will be beneficial if the dynamo can do the first index, and then go the next until it reaches the given limit.
That was the reason why I wanted to try looping, but unfortunately it didnât work.
Exactly what @Alien said. Thereâs no need to assign the material at each index. You can query them all first. Return the options. Then make the selections all at once.
Iâll also second the suggestion for Data-Shapes. It will make this all 100x easier and probably make more sense in the long run too.
Hi,
I am trying to do a bit in sorting lists based on given conditions, before moving to the next step.
Here is the problem, I have a nested list with four levels. And I am trying to filter the list @L2 based on sub-list values @L1 - index [17]. I tried using basic sorting, and the attached python code, but unfortunately this is not helping me.