Continuing the discussion from Read variables set by assignment:
Correct me, if my reasoning process is wrong.
InstallationNode creates a section of code in script file, when the file is created or changed. My intention is to create a URCap, where I can set up some configuration options. These options, however, will not be updated, until I change the program and click “Save” icon. How would I achieve the desired effect, i.e. user changes option in InstallationNode and runs the program without modifying it.
I thought about keeping configuration in Installation variables values and updating them from InstallationNode.
How would I do that? I figured, that Installation is called Persisted in API and I can filter one by name. But I don’t see the method to update it.
Ok, so I didn’t realize, that there is something going on backstage. “generateScript” is called also when program is run. That is great. Now I can be sure, that my variables will be set. My fears were unfounded.
Therefore my case is closed.
I’m trying to understand how to assign these variables, even if I still didn’t get if is possible only for InstallationVariables or all.
I’m following the IdleTimeProgram example, I got my variables list and I can select them in a combobox, can you clarify how I can assign to this variable a value form user input? I’m using the scriptWriter which calls the getSelectedVariable method, which again get the variable form the model (model.get()). But when I run the script, both my InstallationVariables and scriptVariables have same previous values.
Matteo Timossi @recognitionrobotics
Did you manage to solve the problem?