DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

reloading the TDV file stops script running from embedded dialog box

Solved!
Go to solution

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?

0 Kudos
Message 1 of 9
(5,442 Views)

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

0 Kudos
Message 2 of 9
(5,393 Views)

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...

0 Kudos
Message 3 of 9
(5,368 Views)

Hi Brad,

 

We've sent you a link to the uploaded project files, thanks very much for the support!

 

Thanks,

 

Peter

0 Kudos
Message 4 of 9
(5,298 Views)
Solution
Accepted by topic author PGribble

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

Message 5 of 9
(5,245 Views)

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.

0 Kudos
Message 6 of 9
(5,139 Views)

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

0 Kudos
Message 7 of 9
(5,122 Views)

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?

0 Kudos
Message 8 of 9
(5,110 Views)

I believe so, but I haven't tried that.

0 Kudos
Message 9 of 9
(5,104 Views)