# IllegalStateException RG2

**URL:** <https://forum.universal-robots.com/t/illegalstateexception-rg2/22691>\
**Category:** General Application Help: How do I?\
**Created:** [July 15, 2022, 1:12pm UTC](https://forum.universal-robots.com/t/illegalstateexception-rg2/22691 "2022-07-15T13:12:39Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![anon39680143](https://avatars.discourse-cdn.com/v4/letter/a/df705f/32.png) [@anon39680143](https://forum.universal-robots.com/u/anon39680143)\
**Post date:** [July 15, 2022, 1:12pm UTC](https://forum.universal-robots.com/t/illegalstateexception-rg2/22691/1 "2022-07-15T13:12:39Z")

</div>

good morning,  
I have a problem with the RG2 grip. if the command manually, open close or if I assign a measure, such as 20mm and run the command manually, it works. when I start the program where I assign an opening to the gripper I see this message:  
IllegalStateException: Modification to program tree and/or data model must be inside a ‘UndoableChange’ scope. Use ‘UndoRedoManager’ to group undoable changes.  
URCAP RG2-On robot  
version 1.1.0  
developer On Robot ApS  
anyone can say to me what is this error?  
thank in advance

---

<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:** [July 15, 2022, 5:50pm UTC](https://forum.universal-robots.com/t/illegalstateexception-rg2/22691/2 "2022-07-15T17:50:35Z")

</div>

Contact the CAP maker. Screenshot the error after expanding it so they can see which line number is causing the problem, and they will have to send you an update. That’s not something you can control, they are storing values to the datamodel without having wrapped it in an undoredo manager.

---

<div class="post-metadata">

**Author:** ![anon39680143](https://avatars.discourse-cdn.com/v4/letter/a/df705f/32.png) [@anon39680143](https://forum.universal-robots.com/u/anon39680143)\
**Post date:** [July 18, 2022, 7:17am UTC](https://forum.universal-robots.com/t/illegalstateexception-rg2/22691/3 "2022-07-18T07:17:20Z")

</div>

Thank you, i will do this.
