Hi Dojo,
I’m exploring ideas for integrating Visio with Automation Scripts, and I’d like your input on the following use case:

1. Automation Script 1 retrieves values from an element table and processes them into output options for SetVar dropdown lists.

2. Automation Script 1 then assigns these SetVar dropdown options to Dropdown 1 and Dropdown 2 shapes in Visio, allowing users to click the dropdown shapes and select a value.
3. After the user selects values in Dropdown 1 and Dropdown 2 and clicks the Set button, Automation Script 2 should retrieve these selections and perform further processing.
My question is - is there a way in Automation Scripts to set or pass a shape’s data value and read values from the SetVar dropdowns to use them as input for Automation Script?
Thank you in advance.
Hi Jeeva,
The values you select from the dropdowns are stored as session variables. Each one is assigned to the session variable name you set in the SetVar shape data. You can then reference these session variables when running the script using the [var:] syntax.
Script:MyScript|Parameters:MyParameter=[var:SelectedValue1]|Options:NoConfirmation
Yes, you can execute a script automatically when opening a page and use its output to set one or more session variables: https://docs.dataminer.services/dataminer/Operator_guide/Visio/miscellaneous/Configuring_a_page_to_execute_a_script_automatically.htm together with https://docs.dataminer.services/dataminer/Operator_guide/Visio/reference/Overview_of_page_and_shape_options.html#executesetsoninit
Hi Sebastiaan,
Thank you for your response. This is exactly what I want for Automation Script 2 (as shown in the picture above). However, I’d also like to know if there’s a way for Automation Script 1 to set a shape data value as well. Is that possible?