# writeChildren method called multiple times

**URL:** <https://forum.universal-robots.com/t/writechildren-method-called-multiple-times/33963>\
**Category:** URCap Development\
**Created:** [April 26, 2024, 8:48pm UTC](https://forum.universal-robots.com/t/writechildren-method-called-multiple-times/33963 "2024-04-26T20:48:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![eric.feldmann](https://avatars.discourse-cdn.com/v4/letter/e/94ad74/32.png) [@eric.feldmann](https://forum.universal-robots.com/u/eric.feldmann)\
**Post date:** [April 26, 2024, 8:48pm UTC](https://forum.universal-robots.com/t/writechildren-method-called-multiple-times/33963/1 "2024-04-26T20:48:01Z")

</div>

I have some code that I’d like to iterate over and create the child node’s script multiple times. However, calling writer.writeChildren() multiple times puts duplicate labels into the script, and subsequently the program doesn’t run. The API documentation claims you CAN call writeChildren multiple times. Anyone experience this?

---

<div class="post-metadata">

**Author:** ![eric.feldmann](https://avatars.discourse-cdn.com/v4/letter/e/94ad74/32.png) [@eric.feldmann](https://forum.universal-robots.com/u/eric.feldmann)\
**Post date:** [May 1, 2024, 12:34pm UTC](https://forum.universal-robots.com/t/writechildren-method-called-multiple-times/33963/2 "2024-05-01T12:34:58Z")

</div>

Confirmed with UR the documentation is wrong and you cannot call writeChildren multiple times.
