Retaining custom textfield data between UCCNC sessions

If you have a question about the software please ask it here.

Retaining custom textfield data between UCCNC sessions

Postby CNC22369 » Thu Jul 06, 2017 12:09 am

I would like to add some Textfields to my screenset to hold some data specific to my application. As a test, I added a couple of Textfield objects (type textfieldnb) to my screenset --- they work fine except that the data I enter during a session is not retained so that it is already there when I later start another UCCNC session. I've tried invoking Save Settings before exiting, but it had no effect. So, is there a way to cause data entered in a custom Textfield to be saved for a later session? If not, is this a change you would consider making to UCCNC?

Frank
CNC22369
 
Posts: 35
Joined: Mon Sep 19, 2016 4:05 pm

Re: Retaining custom textfield data between UCCNC sessions

Postby ger21 » Thu Jul 06, 2017 12:24 am

It is actually saved to your profile, if you are using the current release version. If you open the .pro file in Notepad, you should see the saved data at the end of the file.

In order to load the values when you restart UCCNC, you need to use the Constructor macro (M99998.txt)
Here's some sample code that i use for field #20342:

readfield = exec.Readkey("UserTextfields", "20342", "0.000");
AS3jog.Setfieldtext(readfield, 20342);


You need to do this for each field.
Gerry
UCCNC 2022 Screenset - http://www.thecncwoodworker.com/2022.html
ger21
 
Posts: 2714
Joined: Sat Sep 03, 2016 2:17 am

Re: Retaining custom textfield data between UCCNC sessions

Postby CNC22369 » Thu Jul 06, 2017 2:05 am

Gerry, thank you for the solution information and your time to post it. Using it I was able to get my test example to work correctly.

Frank
CNC22369
 
Posts: 35
Joined: Mon Sep 19, 2016 4:05 pm


Return to Ask a question from support here

Who is online

Users browsing this forum: AutomaticInvest_4 and 9 guests