Have you looked at the VO command...
VO -Value Temporary Tool Offset {Activate Offset, Offset-X, Offset-Y, Offset-Z, Offset-A, Offset-B, Offset-C}
This command turns on or off a temporary off-setting of movement in each of the axis given a designated offset.All moves are offset from the time the command is activated until it is turned off or the Part File exited.The offsets are added to the current display such that the true current position is displayed in the position readout. The temporary offsets are added to whatever other offsetting or proportioning may be applicable within the file. This command is typically used with a second head such as a dual Z or an air drill.ActivateTool Offset (1 -ON, 2 -OFF)Turns the Temporary Tool Offset ON or OFF. Can be used with or without axis offset parameters. Offset parameters are those most recently entered. Offset Distance X ... C Distance to offset any axis given in the next 6 parameters. Inches or mm.
It's been a while since I've run SB3 and I had many custom files like this, but if a file is run in 2D offset, doesn't it automatically turn it off when finished? I've use the VO command with variables for the desired offset for cutting multiple parts from 4 x 8 sheets and it worked nicely.
You could possibly use an unused output that you turn off/on and then check the status of it.
I'm sure that there are numerous ways to do what you want, just need to find the one that works as desired.
"He who would trade liberty for some temporary security, deserves neither liberty nor security" - Benjamin Franklin
"Make yourself sheep and the wolves will eat you" - Benjamin Franklin