'Location SnapShop INPUT "Do you want to take a (S)napShot of the current location or (R)eturn to the last saved location snapshot?" &answer IF &answer = S THEN GOTO SAVELOC IF &answer = R THEN GOTO RETURNLOC SAVELOC: C#,90 'Load variables from my_variables.sbc Z2 &my_LocSnapshotX = %(6) 'Base coordinate X &my_LocSnapshotY = %(7) 'Base coordinate Y SHELL, "C:\SbParts\Custom\MyVars.exe [&]my_LocSnapshotX =&my_LocSnapshotX" PAUSE 1 SHELL, "C:\SbParts\Custom\MyVars.exe [&]my_LocSnapshotY =&my_LocSnapshotY" 'Current location saved PAUSE END RETURNLOC: 'Determine whether we are in Preview mode or Move/Cut mode &modenow = %(22) IF &modenow = 1 then GoTo CHANGEMODE C#,90 'Load variables from my_variables.sbc INPUT "Do you need to use the Keypad to raise the Z axis to a safe height? (Y) to open Keypad then hit ESC to continue." &showpad IF &showpad = Y then GOSUB SHOWKEYPAD ST J2,&my_LocSnapshotX,&my_LocSnapshotY Z2 'Previously saved location set PAUSE END SHOWKEYPAD: SK RETURN CHANGEMODE: 'Cannot execute in Preview Mode. Quit and change to Move/Cut mode. PAUSE END