Found a bit of a workaround for this.
My VB6 app saves the 3 values I need in the registry, but accessing that from a macro is not straightforward, so I wrote a sub in the VB app that saves the same 3 values, delimited by commas, into a .txt file in Mach3 folder, and into a comment line in the gcode if necessary, which it isn't anymore....
This macro retrieves it, saves it to Mach xml:-
Dim Dep, Drag, Get As String
Open "C:\Mach3\AValues.txt" For Input As #1
Do While Not EOF(1)
Input #1, Get, Drag, Dep
SetVar(501, Get)
SetVar(502, Drag)
SetVar(503, Dep)
Loop
Close #1
This works fine