Hi all!
I have a question on script variables. In the documentation it is explained that:
"Prior to running a script, operators will first have to link the dummies and parameters to actual elements and values in the DMS. Therefore, it is best to give the variables a meaningful name the operators will be able to work with."
Is there any way that this operator interaction is not necessary? The background is that we would like to execute a script via a task in the scheduler, which has a changing value from a memory file for the parameter.
Best regards and thank you in advance for your inspiring answers!
Daniel
Hi Daniel,
If I understood correctly, you have a memory file defined in the Automation module, and you are using this memory file for your script parameter:
If this is the case, when configuring a scheduled task, the user will need to choose one of the possible values from the memory file:
To avoid this, for example you could remove the script parameter and process the memory file directly in a C# script block. The method GetMemory allows you process the content of a memory file.
Hope it helps.
Hi Daniel,
Sorry for the late reply. Indeed, to use the method GetMemory you will need to pass the memory file as parameter. A possible alternative is using subscripts. There is description of this workaround in the following question:
https://community.dataminer.services/question/store-permanent-values-that-can-be-access-by-multiple-scripts/?hilite=memory+file
Please let me know if it helps.
Hi Miguel,
thanks for your answer. In the meantime we are using another solution with the "Generic Dynamic Table" as an element. I'll keep that in mind for other problems.
Hi Miguel, thanks for your answer and the inspiration! I hope I'm on the right track with my script. But now I have the problem that the variable in the view cannot be updated by the script. Please see my additional answer.