Assign the same parameter value to a list within a list

I am working on a Dynamo script that assigns a comment to frame members based on the length and the type. I have successfully grouped the frame members by length and type by putting them into a two-tier list, I want to know if it is possible to write a loop that assigns “1” to the comments of all the members of that tier and repeats based on the number of tiers. I have the process for a single iteration of the loop in the picture below:

No need to loop. Just have to set the list levels and lacing correctly.

First count they number of groups with a List.Count node. Then build a range for the values you want to assign, and convert to a string. Something like “”+(1..cnt); should do the trick in a code block, but you may need to replace the trailing zeros (depending on Dynamo version).

Then set the list level for Elements to @L2 and the list level for value to @L1, then set lacing to longest.

2 Likes