Page 1 of 1

Retain global variables on restart

Posted: Wed May 13, 2015 11:00 am
by Phil
Hi
How easy would it be to add in the function to retain global variables over a restart. Maybe to write them out to a file on shutdown and have the option to read them again when EG starts.
When updating a plug in you need to restart EG, or if the machine is being restarted. For both the these you lose any globals you may have (I have a couple with temperature and whether internal doors are open or closed), it would be handy to have the option to store them.
Maybe this could be as a plug in or part of the program.

thanks

Phil

Re: Retain global variables on restart

Posted: Wed May 13, 2015 11:18 am
by piert
Already available. Search the forum for 'persistent values' .

Re: Retain global variables on restart

Posted: Wed May 13, 2015 2:54 pm
by Phil
Thanks, I've read the posts about persistent variables but the main one seems a very undeveloped idea and one that recommends against saving eg.globals variables across sessions, also it seems quite a complicated solution for a non-programmer.

If you could easily export the eg.globals to a text file and be prompted whether to reload them on start it would be much simpler.

Re: Retain global variables on restart

Posted: Thu May 14, 2015 8:08 am
by piert
If a number of clever people on this forum have already chewed on the subject for some time and this is what they came up with, I doubt it could be done much simpler or better.