01-12-2024 03:02 AM
Hi, I have been searching this forum for any thread regarding my question but maybe it is too simple to be asked?
I have a VBS-script in DIAdem2021 performing some calculations. I have another VBS-file with all the variables used in my VBS-script (in old DIAdem, this was a VAS-file).
I have a SUD-file with a ComboBox where I would like to get a list of selectable options that will be returned to the VBS-script after selection and 'OK' click.
In the old VAS-file setup my variable looked like:
vehicle_ : A ('Volvo','SAAB','Audi')<'Audi'>
What variable type shall I use now, how shall it be defined and how would the SUD-file be arranged to get this ComboBox working?
Thanks in advance!
/Mikael
02-08-2024 10:03 AM
If you want the dialog to access your own script variables, it is best to use an object that contains all the settings. In the best case, you already have a suitable class object in your script that you pass when calling the dialog:
call SudDlgShow("DlgMain", CurrentScriptPath & "Vehicles2021.sud", VehicleObj)
In the attached files I have implemented a small VBS class that takes the choosed value of the car brand, the name of the car brand and a comment. When the dialog is closed with OK, the calling script displays the entered values.