# List.ReplaceItemAtIndex OOTB

**URL:** <https://forum.dynamobim.com/t/list-replaceitematindex-ootb/113023>\
**Category:** Revit\
**Created:** [November 10, 2025, 6:19pm UTC](https://forum.dynamobim.com/t/list-replaceitematindex-ootb/113023 "2025-11-10T18:19:39Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![EzDoesIt](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/ezdoesit/32/70125_2.png) [@EzDoesIt](https://forum.dynamobim.com/u/EzDoesIt)\
**Post date:** [November 10, 2025, 6:19pm UTC](https://forum.dynamobim.com/t/list-replaceitematindex-ootb/113023/1 "2025-11-10T18:19:39Z")

</div>

Why is the OOTB node (List.ReplaceItemAtIndex) reacting so strange the one from Archilab is working correctly.

All the input is one level

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/f/4/f412b816fc48d2e9c0e3f5c088bec660a0d9e577.png)

---

<div class="post-metadata">

**Author:** ![bvs1982](https://avatars.discourse-cdn.com/v4/letter/b/43a26b/32.png) [@bvs1982](https://forum.dynamobim.com/u/bvs1982)\
**Post date:** [November 10, 2025, 6:25pm UTC](https://forum.dynamobim.com/t/list-replaceitematindex-ootb/113023/2 "2025-11-10T18:25:59Z")

</div>

Hard to tell without seeing you whole graph  
(or maybe someone can).

---

<div class="post-metadata">

**Author:** ![Mike.Buttery](https://avatars.discourse-cdn.com/v4/letter/m/b19c9b/32.png) [@Mike.Buttery](https://forum.dynamobim.com/u/Mike.Buttery)\
**Post date:** [November 11, 2025, 1:52am UTC](https://forum.dynamobim.com/t/list-replaceitematindex-ootb/113023/3 "2025-11-11T01:52:51Z")

</div>

_List.ReplaceItemAtIndex_ (and _List.ReplaceItemAtIndices_) do not appear to be able to modify multiple indices in a single list, even if you change the list level of the items to `@1`

Archilab appears to have depreciated the _Lists.ReplaceItemAtIndex_ node  
Clockwork does have a _List.ReplaceItemAtIndex+_ node

Or you could use some python…

```python
from itertools import zip_longest

def to_list(item):
    if isinstance(item, list):
        return item
    return [item]

list_data = IN[0]
indices = to_list(IN[1])
items = to_list(IN[2])

# Checks
assert isinstance(list_data, list), "IN[0] is not a list"

# for loop will repeat the last item if there are more indices than items
for index, item in zip_longest(indices, items, fillvalue=items[-1]):
    list_data[index] = item

OUT = list_data

```

---

<div class="post-metadata">

**Author:** ![EzDoesIt](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/ezdoesit/32/70125_2.png) [@EzDoesIt](https://forum.dynamobim.com/u/EzDoesIt)\
**Post date:** [November 11, 2025, 6:58am UTC](https://forum.dynamobim.com/t/list-replaceitematindex-ootb/113023/4 "2025-11-11T06:58:11Z")

</div>

thank you
