71
VB and the development of wizards / Re: Tool change Macro Issue
« on: February 14, 2021, 10:16:23 AM »
first i would replace:
by:
this:
all this verifycation for tool insert:
1.the MSG has only a OK button
2.no matter what you do (press OK or the X of msgbox), the rest of code will be done anyway
also no Chance to cancel via MSGBox input.
Code: [Select]
x = GetToolChangeStart( 0 ) ' Get x tool change start position
y = GetToolChangeStart( 1 ) ' Get y tool change start position
z = GetToolChangeStart( 2 ) ' Get z tool change start position
by:
Code: [Select]
x = GetOEMDro( 800 ) ' Get x tool change start position
y = GetOEMDro( 801 ) ' Get y tool change start position
z = GetOEMDro( 802 ) ' Get z tool change start position
this:
Code: [Select]
Call SetUserDRO (1224,NewTool)
does not make sense to me, but don't know wether DRO 1224 is used somewhere elseall this verifycation for tool insert:
Code: [Select]
' Verify Tool Change Complete
Msg = "Please Insert Tool Number " & " ( " & GetSelectedTool() & " ) " & " " & GetToolDesc(NewTool) ' Define message
Style = vbYesNo + vbCritical + vbDefaultButton2 ' Define buttons
Style = 0 + 48 + 0 ' Define buttons.
Title = "Tool Change Requested" ' Define title
Help = "DEMO.HLP" ' Define Help file
Ctxt = 1000 ' Define topic 'context. ' Display message.
Response = MsgBox(Msg, Style, Title, Help, Ctxt)
If Response = vbOk Then ' User chose Ok
MyString = "Ok" ' Perform some action
End If
does not make many sense too, except that the machine is waiting for tool insert, because:1.the MSG has only a OK button
2.no matter what you do (press OK or the X of msgbox), the rest of code will be done anyway
also no Chance to cancel via MSGBox input.