Revit Architecture Forum
Welcome to Autodesk’s Revit Architecture Forums. Share your knowledge, ask questions, and explore popular Revit Architecture topics.
abbrechen
Suchergebnisse werden angezeigt für 
Anzeigen  nur  | Stattdessen suchen nach 
Meintest du: 

For/while loop to produce a single list by iterating through

2 ANTWORTEN 2
Antworten
Nachricht 1 von 3
bruno3UP3U
250 Aufrufe, 2 Antworten

For/while loop to produce a single list by iterating through

I am trying to append a specific number of items to an existing list. In the example in the image below the list “a” has one item (0001) and then I append 2 more items (0002 and 0003).

The number of items to append is known but can vary, so I am looking to a way (for / while loop?) that can append that variable number of items and produce one single list.

 

For example, if I have 5 items, I need to create a list that would iterate through the values of 0-4 and produce the list:

0001 [n=0]
0002 [n=1]
0003 [n=2]
0004 [n=3]
0005 [n=4]

 

which would be the result of evaluating

x[0][8]
x[1][8]
x[2][8]
x[3][8]
x[4][8]

(iterating though x[n][8])

All help appreciated. Thanks.

 

dynamo_addtoList.PNG

 

2 ANTWORTEN 2
Nachricht 2 von 3
L.Maas
als Antwort auf: bruno3UP3U

Not sure if I understand but something like this?

Revit - Dynamo Index.png

Louis

EESignature

Please mention Revit version, especially when uploading Revit files.

Nachricht 3 von 3
bruno3UP3U
als Antwort auf: L.Maas

Thanks for reaching out. Turns out I was complicating things and I could do what I wanted with a simple string join!

Sie finden nicht, was Sie suchen? Fragen Sie die Community oder teilen Sie Ihr Wissen mit anderen.

In Foren veröffentlichen  

Autodesk Design & Make Report