# Setting param value in main thread doesn't update control

**URL:** <https://iplug2.discourse.group/t/setting-param-value-in-main-thread-doesnt-update-control/543>\
**Category:** Windows\
**Created:** [11 January 2022 15:30 UTC](https://iplug2.discourse.group/t/setting-param-value-in-main-thread-doesnt-update-control/543 "2022-01-11T15:30:55Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![snfk](https://yyz2.discourse-cdn.com/free1/user_avatar/iplug2.discourse.group/snfk/32/140_2.png) [@snfk](https://iplug2.discourse.group/u/snfk)\
**Post date:** [11 January 2022 15:30 UTC](https://iplug2.discourse.group/t/setting-param-value-in-main-thread-doesnt-update-control/543/1 "2022-01-11T15:30:55Z")

</div>

I’m working on loading parameter values from a JSON file (the “preset”). When a preset is loaded, it loads the JSON file, parses it, and sets each control. This is done on the main thread in the Plugin class. I have a preset header UI that sends a message to the main thread and asks it to load a preset with the given path.

The parameters are set on the main thread just fine, but the controls with parameters do not receive the update (cause they’re on the graphics thread?). It makes sense, but I can’t figure out how to also update the parameters for the controls…

Any help is appreciated!

---

<div class="post-metadata">

**Author:** ![snfk](https://yyz2.discourse-cdn.com/free1/user_avatar/iplug2.discourse.group/snfk/32/140_2.png) [@snfk](https://iplug2.discourse.group/u/snfk)\
**Post date:** [11 January 2022 16:02 UTC](https://iplug2.discourse.group/t/setting-param-value-in-main-thread-doesnt-update-control/543/2 "2022-01-11T16:02:37Z")

</div>

`DirtyParametersFromUI()` did the trick, all clear.

---

<div class="post-metadata">

**Author:** ![olilarkin](https://yyz2.discourse-cdn.com/free1/user_avatar/iplug2.discourse.group/olilarkin/32/2_2.png) [@olilarkin](https://iplug2.discourse.group/u/olilarkin)\
**Post date:** [11 January 2022 16:20 UTC](https://iplug2.discourse.group/t/setting-param-value-in-main-thread-doesnt-update-control/543/3 "2022-01-11T16:20:42Z")

</div>

There is no separate graphics thread - drawing happens on the main thread

---

<div class="post-metadata">

**Author:** ![snfk](https://yyz2.discourse-cdn.com/free1/user_avatar/iplug2.discourse.group/snfk/32/140_2.png) [@snfk](https://iplug2.discourse.group/u/snfk)\
**Post date:** [11 January 2022 19:23 UTC](https://iplug2.discourse.group/t/setting-param-value-in-main-thread-doesnt-update-control/543/4 "2022-01-11T19:23:51Z")

</div>

Very good to know, makes sense.
