You will need to have access to the G-code instructions that direct the motions of your 3D printer in order to advance up the Z-axis at a certain layer in a script. To shift up the Z-axis at a particular layer while using a typical G-code script for your printer, use the following command: G1 Z<new ...