So is your question "how do i get the current offset"? Like G54, G55, G56, etc.?
If that IS the question, then I've deduced this much...
"GetVar (5220)" returns a single digit number. This number is the same number as the offset on the "Offsets" screen in Mach.
So on that screen, G54=1, G55=2, G56=3, etc.
If you try the code below in the "VB script editor" (built into Mach, in the pull-down "Operator" menu), the number returned does indeed correspond with the "fixture" number :
FixNumb = GetVar (5220)
MsgBox (FixNumb)
Even if this wasn't your question, I learned something today.
-Nick