I never use G10 I just directly read/write to the variables.
On every machine I have seen the work offsets are at these variables and can be read and written. There may be some machines that are different but this seems to be one of the more widely used standards.
Not all machines use the Ext. offset or us them in the same way.
Code:
Axis 1 Axis 2 Axis 3 Axis 4
Ext. #5201 #5202 #5203 #5204
G54 #5221 #5222 #5223 #5224
G55 #5241 #5242 #5243 #5244
G56 #5261 #5262 #5263 #5264
G57 #5281 #5282 #5283 #5284
G58 #5301 #5302 #5303 #5304
G59 #5321 #5322 #5323 #5324
So
#5321 = [#5301 + 10.000]
Would set G59 X to G58 X plus 10 inches.
The extended offsets are a little less standard but they should be in the programming manual.
Also if you run out of variables in the #100 and #500 locations you can use the extra unused work offsets in your macros, same for tool offset varables.