Hello,
I would like to get the Card Variable Value from an automation script, but I can not find any documentation about it.
Is it possible?
Thanks
Hi Bruno,
It is not possible to "get" the card variable from an automation script directly, as the script is not aware of how it is triggered, this could also be from e.g. a scheduled task, and in such case there might not be any cube session with an active card variable.
In order to use the variable in a script, you need to inverse the logic: first create a script that accepts an input parameter. Then you can e.g. add a button to the visual overview to start the script, and pass the value of the card variable to the script by using a [cardvar: ] placeholder in the script parameter value when starting the script.
You can find more details in these documentation articles:
Placeholders for variables in shape data values | DataMiner Docs
Linking a shape to an Automation script | DataMiner Docs
Hello Michiel,
That is not working for my case, cause I need to run a script if a visio variable have the value “ON” otherwise it should not run (this script is triggered from a scheduler).