List of repeating items by a varying amount?

Hi!

Beginner Dynamo-user here, currently working on a residential project in Revit, where we need to create sales material for apartments. What I’m trying to achieve is a script that creates floor plans, and dependent views based on how many area objects (those define our apartments) there are per level. So far I’ve managed to filter out and to count the relevant areas, which resulted in a list of numbers.

I’ve now hit a roadblock and I don’t know how to proceed. I’ve found the Clockwork Node that duplicates views as dependent.I want to use that one with a list of repeated items, in which they are repeated based on the list of numbers that I have.

This is how far I’ve gotten:

My question is then, if it is possible to achieve this? I’ve not yet managed to completely wrap my head around how lists works, so there might be something that I’m missing.

1 Like

Hello, your goal is to create “dependent views based on how many area objects (those define our apartments) there are per level” but could you also send an illustration of this? What do you mean by “based on”?

is this what you’re looking for?

If you’re on 1.2 or later, you can achieve a similar result with 1.2+ and list@level:

5 Likes

Hi, I am looking for the List.RepeatItemsByLengths and List.SublistLengths too. May I know where can I get them?

They were deprecated. Have a look here for how to replace them with OOTB nodes: