Page 1 of 1

Fullstopp instead of comma

PostPosted: Sun Oct 02, 2022 3:02 pm
by BKG
Someone who knows of a code to check/correct , to . ? is a bit scary to use the wrong type at Z ofsett

Re: Fullstopp instead of comma

PostPosted: Mon Oct 03, 2022 8:50 pm
by dezsoe
You can use both: UCCNC will convert it.

Re: Fullstopp instead of comma

PostPosted: Tue Oct 04, 2022 12:28 am
by BKG
dezsoe wrote:You can use both: UCCNC will convert it.

Not if it is in a Macro, then the Z ofsett is going crasy if "," is used

string stNominal = exec.TextQuestion("To probe from the Spoilboard surface, enter the nominal thickness of the material. Enter '0' or leave blank if probing from the material surface (mm)");
double Nominal = 0;
if(!(stNominal == ""))
{
Nominal = Convert.ToDouble(stNominal);

Re: Fullstopp instead of comma

PostPosted: Tue Oct 04, 2022 9:55 am
by dezsoe
OK, I see. After you input the string try

Code: Select all
stNominal = stNominal.Replace(',', '.');

This will replace the commas with points.

Re: Fullstopp instead of comma

PostPosted: Tue Oct 04, 2022 1:51 pm
by BKG
dezsoe wrote:OK, I see. After you input the string try

Code: Select all
stNominal = stNominal.Replace(',', '.');

This will replace the commas with points.


Thanks Dezoe, that fixed it :)