Repeat items within sub-lists using another list

Hi All,

Can any one help me to get lists sorted as im struggling to get desired results.

I have 2 lists with list matching lists with sub lists and i want to repeat based on amount per sub list using list without sub lists.

Take items from list and repeat number of times as per numbers in sublists

Helpfully i make sense.

Thanks In Advance


Repeat-Lists.dyn (9.1 KB)

Can you show us a smaller example of what you would have and your expected outcome? You can always duplicate lists to get the same list structure and make things easier if list levels don’t work.

1 Like

@Nick_Boyts Thanks for your time.

i have list that contains 14 sublists but i want to use list that contains names and use repeat node to repeat items based on sublist counts.

So all im trying to do here is give same elements same name instead of using unique for each.

And i just realise that i cant really do what im trying to do.

Is there better way to achieve numbering for same items to be same ?

Regards

Again, it’s hard to tell exactly what your list structure is and how you want it to come out without you showing us exactly what you’re expecting. We need an example.

1 Like

@Nick_Boyts Thanks for your time again.

Lists structures as per attached dyn file in first post.

Do you want actual revit example?

Regards

What is your expected output

1 Like

The issue is that you haven’t shown us what you expect as the output. Your graph is doing exactly what you told it to do currently so there’s nothing to correct. It’s your responsibility to describe the issue in a way that others can understand the problem and offer you solutions or understanding. This is especially important when dealing with deep list levels and uncertain list computation where it’s hard to read the list structure relative to your process. This is why we ask for a smaller example with a defined outcome. Otherwise we can only sit here and guess at what your inputs are and what your output should be.

In some cases, list levels are not enough to deal with complex list structures on their own and more list manipulation is needed. That’s likely the case here but, again, it’s hard to tell with the limited amount of information you’ve provided.

2 Likes

Sorry for late response i managed to get to the end!!! got result i wanted.

All i did is used “Math.Sum” to sum all counts from sublist and repeted items based on lvl1 and now got lists working as intended same items have same number and count starts from start at each list.

Thanks all for your time!!!


Repeat-Lists.dyn (20.9 KB)

1 Like