IF it makes you happy that is all that matters(;-)
You may want to look at something like this as a comparison. It starts by measuing the master then you can set as many tool#s as you like or cancel to end.
Sub Main()
'Macro for tool setting
code " G28 Z0.000"
code " G28 X0.000 Y0.000"
While Ismoving()
Sleep(10)
Wend
'Set Master Tool Routine
MsgBox(" Place the Master tool into the spindle")
Tnum = Question ("Tool Number?")
Ret = MachMsg ("Are you ready to run the MasterTool setting function?", "MasterTool", 1)
If Ret=2 Then End
code "G31 z-10 f20."
While IsMoving()
Sleep(10)
Wend
PRP= (GetVar(2002)+.2)
code "G0 z" & PRP
code "G31 z-10. f3."
While IsMoving()
Sleep(10)
Wend
Code"G92 Z0.000"
Tlo=GetDro(2)
Code" G28 Z0.000"
SetToolParam(Tnum,2,Tlo)
N1:
' SetNext Tool Routine
Ret = MachMsg ("Are you ready to run the Next Tool Setting function?", "MasterTool", 1)
If Ret=2 Then End
Tnum = Question ("Tool Number?")
MsgBox(" Place the NEXT tool into the spindle THEN press OK Routine Will Start.")
code "G31 z-10 f20."
While IsMoving()
Sleep(10)
Wend
PRP= (GetVar(2002)+.2)
code "G0 z" & PRP
code "G31 z-10 f3."
While IsMoving()
Sleep(10)
Wend
Tlo=GetDro(2)
Code" G28 Z0.000"
SetToolParam(Tnum,2,Tlo)
While Ismoving()
Sleep(10)
Wend
GoTo N1
End Sub