I have a correct list of 252 rooms and check if there are some Revit elements inside. This gives me a list with true or false (as child of the rooms) for each element.
Now I need to know the index of every “true” in the sublists. So I use List.Map along with List.AllIndicesOf. This gives a list with only 246 items instead of the 252 rooms I really have in the list!
I marked it in my screenshot.
List.AllIndicesOf skipped the first 6 items from my original list. List.IndexOf gives me the full 252 items but this node is limited to 1 item per list.
I think I found out what happens - can anybody provide me with a workaround?
The first six list items have no “true” - this are the ones which are skipped. I think List.AllIndicesOf will remove the first items if there are no indices found
I’m a bit lost. Sounds like we need a larger glimpse into what you’re after here. Can you explain your overall workflow, and post a camera export of your graph?
Thanks for the URL, I will check it later. I was never a great fan of List.Map.
Found another curiosity in my script. Look at my screenshot. List before and after “List.LaceLongest” is correct, but LaceLongest itself misses again my first 6 empty lists. What’s the reason here? I can live with it because after it I have the correct data but it scares me a bit to see elements missing
Btw: Same result if I use only List.Combine instead.