Jump to content

Saving a "state"


Recommended Posts

Hello one and all (again),

Is there a way for the user to save the state of one's program (i.e. the values of a control) to a file without manually writing values to a spreadsheet manually? It would be kinda useful in the event that a buncha settings are tweaked and the user just wants to quickly recall them later.

Muchos gracias,

Mayur

PS: please do not be offended by my post icon, I wont use it again! :nono:

Link to post
Hello one and all (again),

Is there a way for the user to save the state of one's program (i.e. the values of a control) to a file without manually writing values to a spreadsheet manually? It would be kinda useful in the event that a buncha settings are tweaked and the user just wants to quickly recall them later.

Muchos gracias,

Mayur

PS: please do not be offended by my post icon, I wont use it again! :nono:

I use a ini-file and a global variable for those purposes:

post-885-1146759118.png?width=400

the caption of the control in the global variable is the key in the ini-file in the section "user config". The VI has a "read" function, which is called at programm start, so the global is filled with the values, I write back to the file with the "write" function at the end of the programm. when I open a "edit settings" dialog or something like that, I write the value of the global to the control via a local variable ...

post-885-1146759521.png?width=400

the drawback is: the values in the ini-file are binary, so you cant read them directly unless you are able to read escape sequences ;)

best regards,

CB

Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.