I have a similar problem.
I’m trying to replace items or sublists with other items/sublists. I found a lot of topics dicussing the same issue but I couldn’t find a solution, so please help me. Okay, here comes:
I have a list (Level 4) containing 14 sublists (Level 3) with "Roads"
These 14 sublists contains sublists (Level 2) with “Road_contours”.
(So for example: “Highway” contains 1 sublist “Highway_contours”; List “Parking places” contains 10 sublists “Parking places_contours”)
Al these contours exists out of sublists (Level 1) with lines and arcs
“A”: I know how to create a list with startpoints of the lines and arcs.
“B”: I know how to create a list with start and midpoint for the arcs,
But now comes my problem:
How do I replace the startpoints of the arcs of point 1 with the list with start and midpoints from “B”. (or add midpoints to list “A” under the sublist with startpoints of the arcs) I already did a chop.list to create sublists for every line/startpoint so I can replace “B” with “A”.
I also used List.AllIndicesOf to find the index nr of the arcs, so I could you use these Index to replace points from B in A.
It just doesn’t work, because there are to many sublists and I think Dynamo can’t work that deep without the use of List.map.
So I think I have to do something with List.map and/or List.combine and list.Replace.ItemAtIndex, but I can’t figure out how.
Please help me.