Replace a list instead of item at index in nested list


I am facing confusion on getting the result i need in this replace item at index

i have 4 items in sublists in a list need to be replaced with lists…i know it is kinda confusing but may the pics can be more clear


It is confusing.

Is it only the four indexes in the list of unknown length you want to replace?
What is the list of 80 elements containing 1166 elements then doing?
Is the list of unknown length containing 80 indexes?

Just a hint… please upload your .dyn file and preferable a sample file for getting fast as fast as possible. If we that wants to help you need to rebuild your work, then it is less likely that you will get help fast, especially on the last day of the year :slight_smile:

I am only checking this site maybe once more before I close down for this year.


without having the full picture, try if this can help you…

home.dyn (9.5 KB)


A lot of thanks for your help,

i know it is very confusing, my condition is , i need not to have any arcs in my list so what i have done is took this arcs and divided it into lines, so what i need to do is remove these arcs (i have 4 in my whole list), and replace them with the newly created lines out of these arc divisions

i hope you can get my point and help me with this confusing issue


how can i really replace one item in a sublist by multiple elements…to remove the arc and put the 4 lines on its place


in my script, the 23 is actually the index of the arc inside the 29 list , it is not a value or item…it is index



I would use an if statement to replace arcs in the original list with the list of lines.



IT would be the same issue, it is not about the condition at all its about the replacement