LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Change modal dialogs to default when debugging

Hi

When I am debugging I sometimes open from the block diagram a VI I have made modal. Since it is model, and the code is not running - it locks up LabVIEW and the only way is CTRL+ALT+DELETE to quit labVIEW.

I have heard it is possible to write a VI to fix this problem without closing labVIEW.

I have just had a go writing one that uses the VI refence and VIs in memory to change the window mode to default - but as a VI I can't run it when a modal dialog locks LabVIEW.

So I built it into an app - but it didn't find the VI's open in LabVIEW (which was kinda obvious in hindsight as they would have different memory space).

 

Have have looked for examples that do this but can't find any.... sugestions?

My attempt (attached) saved for LV8.0

 

Regards

Nick

I have LV8.6.

0 Kudos
Message 1 of 10
(7,188 Views)

Hi Nick,

      This tool is a great idea and it works!  Just configure "Close Modal VIs.vi" to Run When Opened (see Execution properties) - and launch it from a File-Explorer window when a modal VI locks-up your app.

While the modal VIs aren't actually closed, they are changed to Default Appearance, so background GUIs become available.

 

Cheers!

Message Edited by tbd on 10-28-2008 12:11 AM
"Inside every large program is a small program struggling to get out." (attributed to Tony Hoare)
0 Kudos
Message 2 of 10
(7,176 Views)
see here
Message 3 of 10
(7,171 Views)

Thanks guys... I thought I was missing something and the run when opened is it.

It didn't occur to me to serach for abort... (As I didn't want to abort - just change it to default window state).

 

Cheers

 

0 Kudos
Message 4 of 10
(7,165 Views)
So is the VI attached at the top of the post the original with problems, or the final working version please?
CLD; LabVIEW since 8.0, Currently have LabVIEW 2015 SP1, 2018SP1 & 2020 installed
0 Kudos
Message 5 of 10
(7,145 Views)

My VI above will do the job if you change its execution properites to run when opened. It will change all modals to default.

 

I am working on a better version after seeing the abort VI example linked above. Its now written but needs checked & debugged.

0 Kudos
Message 6 of 10
(7,122 Views)

Hi -

attached are two VI's.

 

The first (Change Modal VI front panel to Default.vi) allows you to change the behaviour of selected or all modal dialogs to default when debugging.

If you change the window state to default - you can then press the unmodal button to get back to your app to clean up. Then you can easily reset the selected (former) modal VI's back to modal.

Warning - if this VI is open and you open another Modal Dialog its CTRL-ALT-DEL again as LabVIEW cannot open and run a VI already in memory.

 

As I was debugging it I realised the problem is not that the window is modal - but that it open when it should not be. So I added a button to close all modal windows.

 

So the second VI (Close All Modal Dialogs) is a VI that when you run it - closes all modal VI's in memory and then closes itself. This is the simple quick & easy & recommended solution.

 

As these VI's run when opened - to edit / view the diagram place in a new VI and open from the block diagram.

I have attached a screenshot of the Close Modal VI block diagram.

 

I have saved these VI's for V8.0

Message 7 of 10
(7,095 Views)
Message Edited by Nick on 10-30-2008 08:58 AM
0 Kudos
Message 7 of 10
(7,095 Views)
Message Edited by Nick on 10-30-2008 08:58 AM
0 Kudos
Message 7 of 10
(7,095 Views)
Sorry about the dups - on posting it reported an error.... 🙂
Message Edited by Nick on 10-30-2008 08:59 AM
0 Kudos
Message 7 of 10
(7,095 Views)