by Robertspark » Sun Feb 20, 2022 10:52 pm
you have to validate the field too
Function: void Setfield(double value, int fieldnumber)
Description: This function sets the value of a field object. If the field exists on the screen on any tab pages then it will update it's value. If it does not exist then this function will do nothing.
Note that there are fields like the position DROs and feedrate, spindle speed etc. DROs which are updated in the UCCNC from internal variables in loops, these fields cannot be updated permamently using this method,
because the internal functions will rewrite these fields with the internal variable values. Call the Validatefield after the Setfield function to change the value of these kind of fields.
Example: AS3.Setfield(15.23, 100);
Function: void Validatefield(int fieldnumber)
Description: This function validates the value of a field object. If the field exists on the screen on any tab pages then the function executes. If it does not exist then this function will do nothing.
When this function is called then the field value changed event is called inside the UCCNC core and the software will make the actions nessessary to validate the actual value of the field.
Example: AS3.Setfield(12.34, 97); //Sets the value of the X current coordinate field to 12.34
AS3.Validatefield(97); //Validates the 12.34 valuefor the X current coordinate field with writting the offset coordinates as nessessary.