I tryed it.... uhm sorry but it do exactly what I said.
the purpose of this macro is to change the tool and measure it for keep the zero point in the same plase as bofore the change...
I haven't a mobile probe to put on material
Pleeeeease, be patient with me, I don't do intentionally

I tryed this one, is the same as the old one except for the last 4 lines
ChX = GetUserDRO( 1200 )
ChY = GetUserDRO( 1201 )
ChZ = GetUserDRO( 1202 )
Code "G53 G00 Z-0.1" 'Move the tool all the way up
Code "G53 G00 X" & ChX & "Y" & ChY 'Move to the probe position
While IsMoving()
Wend
Code "G31 Z-230 F450" 'Z move down untill hit
While IsMoving()
Wend
ZposOld = GetVar(2002) 'Get the Position that the Porbe hit at
Code "G53 G00 Z-0.1"'Z move all way up
Code "G53 G00 X65 Y-200" 'Move to change tool position
While IsMoving()
Wend
MsgBox ("Insert the new tool")
Code "G53 G00 Z-0.1" 'Move the tool all the way up
Code "G53 G00 X" & ChX & "Y" & ChY 'Move to the probe position
While IsMoving()
Wend
Code "G31 Z-230 F450" 'Z move down untill hit
While IsMoving()
Wend
ZposNew = GetVar(2002) 'Get the Position that the Porbe hit at
Offs = ZposOld - ZposNew
ZNew = 0
ZNew = ZNew - Offs
Code "G53 G00 Z0.1"
Code "G00 x0 y0"
Code "g00 z" & ZNew
Call setdro (2,0.000)
This one work fine, but...
I don't like the fact that It has to go physically to the new zero to set it.
what do you think of my macro?
There a list of all DRO and system variables?