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
Hi Bruno, the visio variables only seem to be local and most are destroyed at the end of the session, even _saved_ variables are only kept on the client https://docs.dataminer.services/user-guide/Basic_Functionality/Visio/Working_with_session_variables.html. Maybe either use a DOM object or red/write to a doc
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).