DASYLab

cancel
Showing results for 
Search instead for 
Did you mean: 

Script Module: Updating child enum based on selection of parent enum in Dialog Manager

Hi all,

I'm using the scripting module (DASYLab 16) and was wondering if anyone has a way to update a child enum depending on the selection of the parent enum in the dialog manager screen similar to how the mathematics scaling module is used for unit conversion. The scaling module allows the user to select the type of conversion e.g. Temperature and then based on that selection, the options in the From: and Post: drop down menus automatically change to units of temperature.

 

I've been trying to make changes in DlgEvent to the child enum based on the value of the parent enum using GetProperty but they don't seem to take effect until I OK out of the dialog manager and then go back into the module.

 

Thanks,

AW

0 Kudos
Message 1 of 3
(2,979 Views)

 

Hi,

see attached script/picture. Unfortunately, this works only for controls placed on 'Module Page'.

Initial values are 'Sausage' and '1', selecting 'Green Salat' sets the 'Amount' property to '0' automatically (as expected 😉 ).

 

enum_update.jpg

 

M.Sc. Holger Wons | measX GmbH&Co. KG, Mönchengladbach, Germany | DASYLab, DIAdem, LabView --- Support, Projects, Training | Platinum NI Alliance Partner | www.measx.com
Download All
Message 2 of 3
(2,917 Views)

@hw70 wrote:

 

Hi,

see attached script/picture. Unfortunately, this works only for controls placed on 'Module Page'.

Initial values are 'Sausage' and '1', selecting 'Green Salat' sets the 'Amount' property to '0' automatically (as expected 😉 ).


Thanks for the response, it helped me understand more about how the predefined methods of the base script interact within DASYLab. Unfortunately, I needed to change the values of the drop down menu on a channel basis on the channel page, which, as you pointed out, we are unable to do. I will just have to make a slightly less elegant solution for my particular case without this functionality.

 

Thanks again,

AW

0 Kudos
Message 3 of 3
(2,882 Views)