# Replace item at index from 2 list

**URL:** <https://forum.dynamobim.com/t/replace-item-at-index-from-2-list/62277>\
**Category:** Revit\
**Tags:** revit, windows\
**Created:** [March 29, 2021, 2:03pm UTC](https://forum.dynamobim.com/t/replace-item-at-index-from-2-list/62277 "2021-03-29T14:03:20Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![harry.3993](https://avatars.discourse-cdn.com/v4/letter/h/e47c2d/32.png) [@harry.3993](https://forum.dynamobim.com/u/harry.3993)\
**Post date:** [March 29, 2021, 2:03pm UTC](https://forum.dynamobim.com/t/replace-item-at-index-from-2-list/62277/1 "2021-03-29T14:03:20Z")

</div>

Hi i am new here. i am trying to get areas from windows and doors edges and laterset value in walls. first I separate windows and doors get their edges and do a multiplication by their thickness. i wanted to do it all in one operation but when firts item was empty i get an error. so i separate the lists and later join them using replace item at index but dynamo doesnt do it how i expect i have a image i hope u can help me

 ![Capture](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/e/8/e821396e24a780febcf2cb4d24976bfb39fab6a2.png)

---

<div class="post-metadata">

**Author:** ![Hamish](https://avatars.discourse-cdn.com/v4/letter/h/a5b964/32.png) [@Hamish](https://forum.dynamobim.com/u/Hamish)\
**Post date:** [March 29, 2021, 11:52pm UTC](https://forum.dynamobim.com/t/replace-item-at-index-from-2-list/62277/2 "2021-03-29T23:52:06Z")

</div>

I’d need to see more of you inputs/outputs to work out what’s gone wrong - but an easy solution could be to use MergeByBoolMask from the Springs package.

---

<div class="post-metadata">

**Author:** ![harry.3993](https://avatars.discourse-cdn.com/v4/letter/h/e47c2d/32.png) [@harry.3993](https://forum.dynamobim.com/u/harry.3993)\
**Post date:** [April 5, 2021, 1:05am UTC](https://forum.dynamobim.com/t/replace-item-at-index-from-2-list/62277/3 "2021-04-05T01:05:42Z")

</div>

thanks Hamish I think I got it but in another way.
