2491
VB and the development of wizards / Re: Act sometimes
« on: September 03, 2014, 03:48:14 AM »
ok then i expanded the sample a little bit:
regards Thomas
Code: [Select]
let's say
'marker red = tool 5
'marker blue = tool 6
'marker black = tool 7
' Get actual tool # and new tool #
ToolOld = GetCurrentTool()
ToolNew = GetSelectedTool()
'here we do the marker things
'here we do the code to deactivate the markers
If ((ToolOld = 5) or (ToolOld = 6) or (ToolOld = 7))
'code to desactivate markers
code "G01 X?? Y??"
'and so on
End If
If ((ToolNew = 5) or (ToolNew = 6) or (ToolNew = 7))
If (ToolNew = 5) Then
'add here the code activate red marker
code " G01 X?? Y??"
'and so on
End If
If (ToolNew = 6) Then
'add here the code activate blue marker
code " G01 X?? Y??"
'and so on
End If
If (ToolNew = 7) Then
'add here the code activate black marker
code " G01 X?? Y??"
'and so on
End If
Exit Sub
else
'here we do the original M6Start things
End If
regards Thomas