# Trigger generateScript

**URL:** https://forum.universal-robots.com/t/trigger-generatescript/1075
**Category:** URCaps SDK
**Created:** [August 15, 2017, 1:32pm UTC](https://forum.universal-robots.com/t/trigger-generatescript/1075 "2017-08-15T13:32:08Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![anon58840761](https://avatars.discourse-cdn.com/v4/letter/a/e9c0ed/32.png) [@anon58840761](https://forum.universal-robots.com/u/anon58840761)
#### Post date: [August 15, 2017, 1:32pm UTC](https://forum.universal-robots.com/t/trigger-generatescript/1075/1 "2017-08-15T13:32:08Z")

</div>

Is there a way of retriggering generateScript function again to overwrite existing part or does this only execute once?

---

<div class="post-metadata">

### Author: ![jbm](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.universal-robots.com/jbm/32/614_2.png) [@jbm](https://forum.universal-robots.com/u/jbm)
#### Post date: [August 16, 2017, 6:30am UTC](https://forum.universal-robots.com/t/trigger-generatescript/1075/2 "2017-08-16T06:30:36Z")

</div>

The `generateScript()` method is called when the program is started.  
Following this, the combined script is sent for execution.  
Changes will only have effect again, if the program is stopped and then started.

---

<div class="post-metadata">

### Author: ![SonglinCai](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.universal-robots.com/songlincai/32/478_2.png) [@SonglinCai](https://forum.universal-robots.com/u/SonglinCai)
#### Post date: [August 16, 2017, 8:52am UTC](https://forum.universal-robots.com/t/trigger-generatescript/1075/3 "2017-08-16T08:52:45Z")

</div>

Seems when we save the program, this function will be called as well.
