03-08-2016 10:07 AM
We're creating a user front end in the view panel, which currently uses scripts to run various functions through an embedded dialog box.
We're now hoping to switch between different user panels, but when we load a new layout (to refresh the view pane) it immediately ends execution of the script.
Is this expected behaviour? Is there a way around it? Or do we have to split our script and have a push button to initialise the page before we can start?
Solved! Go to Solution.
03-11-2016 08:11 AM
Hi PGribble,
I talked to R&D about your issue, and they were unable to imagine a cause. They are, however, happy to look into it if we can reproduce your issue here at NI. Could you send in all the files necessary to reproduce the issue?
Brad Turpin
DIAdem Product Support Engineer
National Instruments
03-13-2016 07:38 AM
Hi Brad,
I'm happy to bounce the files over once I get back into the office. My hunch is that it's an issue because the script is running from inside the dialog box, and therefore replacing that dialog box is terminating the script...
03-18-2016 11:16 AM
Hi Brad,
We've sent you a link to the uploaded project files, thanks very much for the support!
Thanks,
Peter
03-22-2016 09:58 AM
Hi Peter,
I asked R&D to look at your application. Your guess was correct. You have a SUDialog embedded in a TDV file that has a callback function that loads a new TDV file. So you have a VBScript function that-- part way through execution-- removes itself from memory. The analogy R&D mentioned was sitting on the limb that you're sawing off the tree.
Could you perhaps instead insert a custom icon or menu or pop-up non-modal SUDialog to load a new TDV file? What would work best for your use case?
Brad Turpin
DIAdem Product Support Engineer
National Instruments
03-30-2016 10:38 AM
Hi Brad,
Thanks, we thought that was probably the issue, but I wanted to make sure that's what we were seeing.
Our current plan is to make a separate embedded dialog box in the corner to handle system level actions. Basically what we want to do is be able to switch between that dialog box and another one, for different activities, so the intention is to make a little system dialog window that lets you switch between modes.
03-31-2016 11:15 AM
Hi PGRibble,
It sounds like you want a floating non-modal SUDialog. As soon as you embed the SUDialog in a TDV, I don't see how you can issue commands from it to switch
the TDV file.
Brad Turpin
DIAdem Product Support Engineer
National Instruments
04-01-2016 03:14 AM
Hi Brad,
We really only need to change one panel, so rather than reloading the TDV the plan is just to change that dialog pane from another one. That should work okay, right?
04-01-2016 09:07 AM
I believe so, but I haven't tried that.