Saving custom fields by name automatically

This is where you talk about Macros, show examples of your macro scripting and SHARE handy segments of script code as examples.

Saving custom fields by name automatically

Postby CNC22369 » Thu Apr 25, 2024 4:25 pm

Please correct me or add missing information.
It is my understanding that UCCNC will automatically save custom field values on exit to the [UsersTextfields] profile section. For example, custom field 20350 having a value of 5 would appear in the profile section as 20350=5 and will be updated on UCCNC ending. What is the method to create a name for the custom field 20350? For example, instead of 20350=5, how do I get it to be customfieldvalue=5. Is the field number somehow setup in a function that is then referred to? Can someone provide an example snippet of code to do this?

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

Re: Saving custom fields by name automatically

Postby ger21 » Thu Apr 25, 2024 7:56 pm

In the profile, it's always going to be the field number. When you read the profile in your macro, you can then assign it to a variable named "customfieldvalue".
Gerry
UCCNC 2022 Screenset - http://www.thecncwoodworker.com/2022.html
ger21
 
Posts: 2679
Joined: Sat Sep 03, 2016 2:17 am


Return to Macros

Who is online

Users browsing this forum: No registered users and 6 guests