Autosave checkboxes

Post anything you want to discuss with others about the software.

Autosave checkboxes

Postby Alberto FUL » Fri Feb 09, 2018 5:33 pm

I don't understand how (or If) checkboxes are saved upon exit.
Eventually how to retrieve them.
Alberto FUL
 
Posts: 39
Joined: Thu Jan 12, 2017 1:48 pm
Location: Italy

Re: Autosave checkboxes

Postby Battwell » Fri Feb 09, 2018 6:10 pm

you can write a macro that reads them and saves them to the profile- put this in your destructor macro when fully tested.

on startup re read the values in a constructor macro. re write them to screen if required
these are both in your macro folder. - but blank. highest macro numbers

i had to do this to save everything in my tool changer.
Uc300eth on router and mill.
UK uccnc powered machine sales. https://cncrouter.uk/atc-cnc-routers.htm
Automateanything/duzzit cnc/mercury cnc
Battwell
 
Posts: 819
Joined: Sun Sep 25, 2016 7:39 pm
Location: South Wales. Uk

Re: Autosave checkboxes

Postby ger21 » Fri Feb 09, 2018 6:20 pm

I do this in the constructor macro.

Code: Select all
string key20303 = exec.Readkey("UserCheckboxes", "20303", "False");
if (key20303=="True")
    {
      .............
      ............
    }
Gerry
UCCNC 2022 Screenset - http://www.thecncwoodworker.com/2022.html
ger21
 
Posts: 2663
Joined: Sat Sep 03, 2016 2:17 am

Re: Autosave checkboxes

Postby dezsoe » Fri Feb 09, 2018 6:35 pm

A short way in M99999 to save:
Code: Select all
exec.Writekey("YourSection", "YourKey", AS3.Getcheckboxstate(10000).ToString());

And in M99998 to load:
Code: Select all
AS3.Setcheckboxstate(Convert.ToBoolean(exec.Readkey("YourSection", "YourKey", "False")), 10000);
dezsoe
 
Posts: 2049
Joined: Sun Mar 12, 2017 4:41 pm
Location: Csörög, Hungary

Re: Autosave checkboxes

Postby Alberto FUL » Fri Feb 09, 2018 7:43 pm

Thank You guys
Alberto FUL
 
Posts: 39
Joined: Thu Jan 12, 2017 1:48 pm
Location: Italy


Return to General discussion about the UCCNC software

Who is online

Users browsing this forum: No registered users and 23 guests