LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Saving all checked menu items before closing the vi (.exe) panel to a file & restoring it later

Hello all,

 

I am using a customized menu bar for my labview application. I need to have a feature to save the context of the entire menu bar before closing the vi and also to restore it  later on reopening. Basically I have given menu items which get "checked" upon user selection. Is there any efficient way to handle this?..Though I have seen an example (under default examples which come with labview) of context saving for controls and indicators, but it is becoming tedious for menu bar as it has a lot of menu items to be saved.

 

Please suggest something for this.

 

Thanks

0 Kudos
Message 1 of 2
(2,449 Views)

Maintain an array that keeps track of all the menu items that become checked or are changed to a non-default status.  Every time a menu gets changed, add that to the array.  Anytime that a menu gets set back to the default value, search the array and delete that item from it.

 

Now when your program closes, you have an array of everything that is non-default.  Write that out to a file.  When your program restarts, load that file and change all the menu times listed to match.

0 Kudos
Message 2 of 2
(2,420 Views)