Reflect changes made in installation tab to a node in program tab

So, I have a URCap which captures waypoints in the installation tab, saves them in the DataModel and allows them to be added as waypoint nodes in the program tab.
What I want to do now is, after adding a waypoint node in the program tab, for any changes made to the waypoint in the installation tab to be reflected to the corresponding waypoint node in the program tab.

Q1. Is there a way to achieve this easily using URCaps API?

Q2. As I am unable to find an answer to Q1, I devised a workaround by saving flags in the DataModel.

ChangeFlag && RegisterFlag are initially false :arrow_right: when a waypoint node is added in the program, RegisterFlag = true; when a waypoint is updated in the installation tab, ChangeFlag = true :arrow_right: if ChangeFlag && RegisterFlag = true, update waypoint node with new values from DataModel

Which brings me to Q2. Is there a way to change the parameters (Speed, Acceleration, Blend) of a waypoint already added in the program?

Q3. Also, when a waypoint node is deleted from the program, I need to set RegisterFlag back to false. Is there a way to know when a node has been deleted? A listener on the delete icon, perhaps?

Thank you for your time.

If anyone else needs this information, the answers are
Q1. no
Q2. no
Q3. no
I have given up on this problem.

I think for answer 1 you could save the name of the waypoint in the program tab and then just retrieve the Pose data/ joint positions (however you saved it in Installation) from the Installation when you want to use the point. Assuming you are making a URCap which it sounds like you are.

1 Like

Thank you for your answer.

I have considered that, too, but I was hoping someone knows an easier way because it’s really complicated to program.
Also, after retrieving the data from the installation tab, do you know if I can update the corresponding node in the program tab?
Because my research up to now tells me that nodes added to the program cannot be changed programatically using java.

There are a couple of different ways of doing that but the way I mentioned above would only save the waypoints name in the program nodes datamodel. Then whenever you want to use the waypoint (moveTo, generate script), you just pull it from the installation so that it always uses what is currently set up in your installation node. You would also want to create a check to make sure that the waypoint still exists in the isDefined function of your Program Node.

Also, you can retrieve an instance of your installation node contribution so that you can use public methods from the installation in the program node. An example of this is shown in HelloWorld Example provided by UR. (getInstallation)

1 Like

@nrivas Thank you for your insight.

Somehow I think what you’re suggesting and what I have in mind are similar.
Guess there’s no easier way than this.