DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Can I see global variable changes from a ScriptStart VBS in a non-modal SUD Dialog?

Hi, I have a non-modal SUD dialog with a button that executes a VBS via "ScriptStart". 

 

It seems as though once the script starts, nothing on the SUD is updated until the VBS from ScriptStart completely executes, and therefore I cannot see any global variable updates on my SUD.  

 

Is there a way I can update how these global variables are changing on my non-modal SUD?

 

Thanks! 

Julia

0 Kudos
Message 1 of 5
(3,748 Views)

Hi Julia,

 

If a script is running it blocks all DIAdem user interfaces. That’s per design to prevent unforeseen complications. But you have access to the non-modal dialog in that script and you could update the controls there.

Greetings

Walter

0 Kudos
Message 2 of 5
(3,714 Views)

Hi Julia,

This is because ScriptStart command starts your script synchronously which means that your non modal dialog script is waiting for your sub script to complete. The only way I can think of is using a worker to start your sub script asynchronously:

http://zone.ni.com/reference/en-XX/help/370858M-01/parallelprocesscontrol/objects/parallelprocesscon...

But this can make your architecture much more complicated.

Regards

Christian
CLA, CTA, CLED
Message 3 of 5
(3,707 Views)

Find a simple example attached.

Christian
CLA, CTA, CLED
Message 4 of 5
(3,703 Views)

Thank you!  I think for now I will split up my VBS into a few parts so I can see intermediate changes.  Thanks again!

0 Kudos
Message 5 of 5
(3,685 Views)