Edit tool screen

If you created a new screenset and want to share it with others then please post it here. You can talk about screens here.

Edit tool screen

Postby BKG » Tue Aug 02, 2022 11:15 am

Hello, I would like to add a label / field to the tool compensation list which, like tool length and tool diameter, should be linked to info in the profile file.
Does anyone have tips or links to literature on the subject?

I for ex do not understand how / when data is loaded into the label.

I'm somewhat used to Visual Basic, which has things like on load, do so and so
BKG
 
Posts: 53
Joined: Fri May 10, 2019 8:32 pm

Re: Edit tool screen

Postby ger21 » Tue Aug 02, 2022 12:37 pm

Are you talking about the detailed Windows table you can open, or the normal fields on the screen?
Gerry
UCCNC 2022 Screenset - http://www.thecncwoodworker.com/2022.html
ger21
 
Posts: 2671
Joined: Sat Sep 03, 2016 2:17 am

Re: Edit tool screen

Postby BKG » Tue Aug 02, 2022 2:15 pm

ger21 wrote:Are you talking about the detailed Windows table you can open, or the normal fields on the screen?


Windows table I asume se image
Attachments
Skjermbilde 2022-08-02 161217.jpg
Tool list
BKG
 
Posts: 53
Joined: Fri May 10, 2019 8:32 pm

Re: Edit tool screen

Postby BKG » Tue Aug 02, 2022 2:19 pm

Also, how can I best convert string to int ?

Nead tihis as integer

string New_toolpos = exec.Readkey("Tooltablevalues","ToolPos"+Newtool, "");
string Current_toolpos = exec.Readkey("Tooltablevalues","ToolPos"+Currenttool, "");
BKG
 
Posts: 53
Joined: Fri May 10, 2019 8:32 pm

Re: Edit tool screen

Postby ger21 » Tue Aug 02, 2022 5:45 pm

Windows table I assume see image

No, just standard screen elements. Just use the screen editor to add your own fields. Your user fields will automatically be saved in the profile under UserTextFields I think.
Gerry
UCCNC 2022 Screenset - http://www.thecncwoodworker.com/2022.html
ger21
 
Posts: 2671
Joined: Sat Sep 03, 2016 2:17 am

Re: Edit tool screen

Postby BKG » Tue Aug 02, 2022 5:56 pm

BKG wrote:Also, how can I best convert string to int ?

Nead tihis as integer

string New_toolpos = exec.Readkey("Tooltablevalues","ToolPos"+Newtool, "");
string Current_toolpos = exec.Readkey("Tooltablevalues","ToolPos"+Currenttool, "");


Fix:

string SNew_toolpos = exec.Readkey("Tooltablevalues","ToolPos"+Newtool, "");
string SCurrent_toolpos = exec.Readkey("Tooltablevalues","ToolPos"+Currenttool, "");

double DNew_toolpos;
double DCurrent_toolpos;
int New_toolpos;
int Current_toolpos;

DNew_toolpos = Convert.ToDouble(SNew_toolpos); //BK String to Double
DCurrent_toolpos = Convert.ToDouble(SCurrent_toolpos); //BK String to Double

New_toolpos = Convert.ToInt16(DNew_toolpos);//BK Double to int

Current_toolpos = Convert.ToInt16(DCurrent_toolpos);//BK Double to int
BKG
 
Posts: 53
Joined: Fri May 10, 2019 8:32 pm

Re: Edit tool screen

Postby BKG » Tue Aug 02, 2022 6:03 pm

ger21 wrote:Are you talking about the detailed Windows table you can open, or the normal fields on the screen?


what is a windows table ?
BKG
 
Posts: 53
Joined: Fri May 10, 2019 8:32 pm

Re: Edit tool screen

Postby ger21 » Tue Aug 02, 2022 6:23 pm

int New_toolpos = Convert.ToInt16(exec.Readkey("Tooltablevalues","ToolPos", "") + Newtool;
Gerry
UCCNC 2022 Screenset - http://www.thecncwoodworker.com/2022.html
ger21
 
Posts: 2671
Joined: Sat Sep 03, 2016 2:17 am

Re: Edit tool screen

Postby BKG » Sat Aug 13, 2022 10:57 pm

Error message in M6
CS1026 | in line: 168 | error text: Forventet )
CS1026 | in line: 170 | error text: Forventet )
--------------------------------------
Trying to get the New Slot value for to get right tool from the right toolholder Vers2115

the profile file is in type string ? and the number for toolchange nead to be in Integer ?? isent it so ?

int New_toolpos = Convert.ToInt16(exec.Readkey("Tooltablevalues","Slot"+Newtool,"");
int Current_toolpos = Convert.ToInt16(exec.Readkey("Tooltablevalues","Slot"+Currenttool,"");
BKG
 
Posts: 53
Joined: Fri May 10, 2019 8:32 pm

Re: Edit tool screen

Postby BKG » Sun Aug 14, 2022 8:49 am

This line of code is not ok both in vers 2114 or vers2115
int New_toolpos = Convert.ToInt16(exec.Readkey("Tooltablevalues","Slot"+Newtool,"");

This lines of code is ok in vers2114 but not vers2115 odd message se image


string SNew_toolpos = exec.Readkey("Tooltablevalues","Slot"+Newtool, "");
string SCurrent_toolpos = exec.Readkey("Tooltablevalues","Slot"+Currenttool, "");

double DNew_toolpos;
double DCurrent_toolpos;
int New_toolpos;
int Current_toolpos;

DNew_toolpos = Convert.ToDouble(SNew_toolpos); //BK String to Double
DCurrent_toolpos = Convert.ToDouble(SCurrent_toolpos); //BK String to Double

New_toolpos = Convert.ToInt16(DNew_toolpos);//BK Double to int

Current_toolpos = Convert.ToInt16(DCurrent_toolpos);//BK Double to int

IMG_0176.jpg
error message
BKG
 
Posts: 53
Joined: Fri May 10, 2019 8:32 pm

Next

Return to Custom Screensets

Who is online

Users browsing this forum: No registered users and 2 guests