Vertex k8400 and ending procedure

Hi
I am using Vertex Repetier for printing from SD and i want it to “tell” my printer to go to the 10cm height with table after printing. If the printed object is lower than 10cm --> go to 10cm position, if it’s higher, just stay with the table where you are.
Can you modify for me my ending procedure?

G28 ; Home extruder
G1 Z5 F{Z_TRAVEL_SPEED}
G1 Z0 F{Z_TRAVEL_SPEED}
M106 S165 ; Turn on fan
G90 ; Absolute positioning
M82 ; Extruder in absolute mode
; Activate all used extruder
{IF_EXT0}M104 T0 S{TEMP0}
{IF_EXT1}M104 T1 S{TEMP1}
G92 E0 ; Reset extruder position
; Wait for all used extruders to reach temperature
{IF_EXT0}M109 T0 S{TEMP0}
{IF_EXT1}M109 T1 S{TEMP1}
{IF_EXT0}T0
{IF_EXT1}T1
M83
G1 E10 F100
M82
G92 E0 ; Reset extruder position
M117 Vertex is printing
G1 F300 Z5

The code you posted is the starting code you would need to change the ending code.

However I don’t think you can do all of that.
I have mine set to position the print bed to 150mm after the print job.

M107 ; Turn off fan
; Disable all extruder
M106 S165 ; Turn on fan
M420 R1 B1 E1 ; white
G91 ; Relative positioning
{IF_EXT0}T0
{IF_EXT0}G1 E-1 ; Reduce filament pressure
M104 T0 S0
{IF_EXT1}T1
{IF_EXT1}G1 E-1 ; Reduce filament pressure
M104 T1 S0
G90 ; Absolute positioning
G92 E0 ; Reset extruder position
G0 X190 Y190 Z150
M140 S0 ; Disable heated bed
M84 ; Turn steppers off
T0
T1
T0