# How to access Program Contribution Configuration from Installation Node

**URL:** <https://forum.universal-robots.com/t/how-to-access-program-contribution-configuration-from-installation-node/15808>\
**Category:** Java\
**Created:** [August 5, 2021, 12:45pm UTC](https://forum.universal-robots.com/t/how-to-access-program-contribution-configuration-from-installation-node/15808 "2021-08-05T12:45:20Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![s.bucholc](https://avatars.discourse-cdn.com/v4/letter/s/4af34b/32.png) [@s.bucholc](https://forum.universal-robots.com/u/s.bucholc)\
**Post date:** [August 5, 2021, 12:45pm UTC](https://forum.universal-robots.com/t/how-to-access-program-contribution-configuration-from-installation-node/15808/1 "2021-08-05T12:45:20Z")

</div>

Hi everyone!

My goal is to achieve functionality where user I’ll be able to turn on/off (show/hide) some URCaps from the installation node. To hide program node I need set configuration.setUserInsertable in program node service to false. How I can access this configuration from Installation Node?

I am sure that it can be achieved, because OnRobot has a similar solution. In installation setting for OnRobot URCap you can choose type of gripper. After restart the necessary URCaps appear in Program Tab.

Someone has any suggestion how to do this?

---

<div class="post-metadata">

**Author:** ![sko](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.universal-robots.com/sko/32/573_2.png) [@sko](https://forum.universal-robots.com/u/sko)\
**Post date:** [August 17, 2021, 12:06pm UTC](https://forum.universal-robots.com/t/how-to-access-program-contribution-configuration-from-installation-node/15808/2 "2021-08-17T12:06:48Z")

</div>

Hello @s.bucholc

that is not something usually needed. You can, depending on the setting in the installation node, adjust the UI in the program nodes to let user know, that it node is no longer fully configured according to the settings in the installation node. This would avoid the need of a robot reboot.

If you would like to toggle the visibility completely, you need a way to store this information persistent between reboots. As the Data model is not available in this stage, storing a config file with the desired behavior could be a possible solution.

---

<div class="post-metadata">

**Author:** ![s.bucholc](https://avatars.discourse-cdn.com/v4/letter/s/4af34b/32.png) [@s.bucholc](https://forum.universal-robots.com/u/s.bucholc)\
**Post date:** [August 18, 2021, 7:50am UTC](https://forum.universal-robots.com/t/how-to-access-program-contribution-configuration-from-installation-node/15808/3 "2021-08-18T07:50:32Z")

</div>

@sko thank you for reply,

What you propose may be a better solution, but still I’m curious how to achieve that functionality?

In my URCap I have one _installation node_ and several _program nodes_. From _program node_ I can easy cal method belong to _installation node_.

Example

```auto
MyInstallationNodeContribution installationNode = apiProvider.getProgramAPI().getInstallationNode(MyInstallationNodeContribution.class);
installationNode.someMethod();

```

But how can I do other way round? Can I reach _program node_ method from _installation node_?

E.g. after changing some setting in _installation node_ I also wanna change settings in all inserted _program nodes_ from my URCap.

---

<div class="post-metadata">

**Author:** ![sko](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.universal-robots.com/sko/32/573_2.png) [@sko](https://forum.universal-robots.com/u/sko)\
**Post date:** [August 18, 2021, 3:22pm UTC](https://forum.universal-robots.com/t/how-to-access-program-contribution-configuration-from-installation-node/15808/4 "2021-08-18T15:22:59Z")

</div>

Hi @s.bucholc

you would reach out from the Program Node to the installation node, on its creation and e.g. on the _openView()_ - Method being called. To avoid the wrong Script Code being provided the status should also be checked using the approach shown in your answer in the _ScriptWriter()_ - Method.

So you need to store the information only once in the installation and each program node reads it when needed.

---

<div class="post-metadata">

**Author:** ![s.bucholc](https://avatars.discourse-cdn.com/v4/letter/s/4af34b/32.png) [@s.bucholc](https://forum.universal-robots.com/u/s.bucholc)\
**Post date:** [August 19, 2021, 8:08am UTC](https://forum.universal-robots.com/t/how-to-access-program-contribution-configuration-from-installation-node/15808/5 "2021-08-19T08:08:14Z")

</div>

Hi @sko

Thank you for advice. However I’m still wander haw to do some kind of callback?

Here is another example: I have installation settings and toolbar as below. I managed to achieve a functionality where changes in the toolbar are reflected in installation setting.

How I can do other way round? I would like slider in toolbar to move with the slider from the installation config etc.

 ![SCR_01](https://us1.discourse-cdn.com/flex020/uploads/universal_robots/original/2X/8/82ec9564d75a991c451ebfa87c332a399da477fc.png)

---

<div class="post-metadata">

**Author:** ![sko](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.universal-robots.com/sko/32/573_2.png) [@sko](https://forum.universal-robots.com/u/sko)\
**Post date:** [August 23, 2021, 12:02pm UTC](https://forum.universal-robots.com/t/how-to-access-program-contribution-configuration-from-installation-node/15808/6 "2021-08-23T12:02:22Z")

</div>

Hi @s.bucholc

With the toolbar you can start a TimerTask with the _openview()_ - Method.

 ![toolbarOpenViewInvokeLater](https://us1.discourse-cdn.com/flex020/uploads/universal_robots/original/2X/d/da791d2996d5b0d6a068638e2831d7fc5999440c.png)

The setToolbarDurationSlider() - Method is setting the currently stored value read out form the installation nodes datamodel.

The _200_ parameter defines the time period in ms between each function call, but it does not run as smooth as if it was triggered from the _changeListener_ inside the slider.

In the _closeView()_ - Method you would then stop the timerTask again.
