<p><a href="/a/10588/">This answer</a> already explains how you insert the G-codes to enable a pause into your model. But, <strong>this will only work if the printer supports the G-codes that are inserted by Cura</strong>. E.g. <a href="/q/11236">this question</a> shows that this does not always work!</p>

<p>To pause the printer you would need to resort into other methods, e.g. a manually inserted <a href="https://reprap.org/wiki/G-code#G4:_Dwell" rel="nofollow noreferrer"><code>G4</code> (Dwell)</a> would be a viable solution as shown in  <a href="/a/11242">this answer</a>.</p>

CC BY-SA 4.0
2019-11-25T12:13:43.573Z
2019-11-26T13:05:52.693Z
2019-11-26T13:05:52.693Z
0scar
<p>Ultimaker Cura contains "Extensions"; in version 4.1.0, the process is as follows:</p>

<ul>
<li>Extensions -> Post Processing -> Modify G-code</li>
<li>Add a Script -> Pause at height

<ul>
<li>Choose the one that matches your firmware!</li>
</ul></li>
<li>Choose the <code>Pause height</code> to match the height the insertion should take place. Usually, this is to be the layer just before the roof is to be printed to keep the inserted objects from protruding from their cavities.</li>
<li>Choose a park position well outside of the print. X 10 Y 10 is usually a good position for this.</li>
<li>Add a little retraction if you want.</li>
</ul>

<p>In printing, you have to wait till the cavity is formed, insert the item quickly and press the control button to resume. The shorter the pause, the better the next layer will hold to the already printed.</p>

<p>Also, keep in mind to make the cavity a little larger than the insert, both in XY and Z, to compensate for the plastic shrinking a little and to allow the nozzle to pass well over the inserted item.</p>

CC BY-SA 4.0
2019-07-14T12:54:18.833Z
Note that there are different pausing scripts based on printer type; choose wisely.
0scar
CC BY-SA 4.0
2019-07-15T15:39:14.413Z
Neat trick, but I get the impression that it is actually faster to pop the gcode file into np++ and add a standard line or two of code at the appropriate layer.
Carl Witthoft
CC BY-SA 4.0
2019-07-15T16:18:14.507Z
@CarlWitthoft finding the right line is the problem then
Trish
CC BY-SA 4.0
2019-07-15T17:17:18.957Z
@Trish once you know the layer number - which you need for the Cura tool -- it's easy to find that in the gcode file.
Carl Witthoft
CC BY-SA 4.0
2019-07-16T06:17:07.140Z
No @carlwitthoft one needs the absolute height, not layer number
Trish
CC BY-SA 4.0
2019-07-16T11:52:22.177Z
@Trish  why?  If you know where the first "roof" layer is, why isn't that sufficient? I've successfully placed a "pause" command that way several times when I wanted to swap filaments at a particular height in a print.
Carl Witthoft
CC BY-SA 4.0
2019-07-16T17:18:35.970Z
@CarlWitthoft While for convenience most people print in intervals of 0.1 mm layer height, others use intervals of 0.08 mm or something similar as that's what an exact multiple of steps on their lead screw is. In these cases, and making it independant of a layer count, knowing an absolute height is easier than converting it to the layer. With the same script setting you could print an item in 0.1 mm as well as 0.3 mm layer height without adjustment. Add to that layer 1 is often not the same as any subsequent layer.
Trish
CC BY-SA 4.0
2019-11-25T12:07:07.310Z
Please note that the printer firmware must be able to handle the inserted G-codes. Please see [this answer](/a/11242), it shows that if a firmware that does not support the inserted G-codes is loaded onto the machine, the inserted Cura scripts will not work.
0scar
CC BY-SA 4.0
2019-07-14T11:06:39.267Z
2019-07-14T13:08:52.480Z
2019-07-14T13:08:52.480Z
Trish
<p>I have a model that contains a cavity, into which I want to insert a piece of metal, so I can use a magnet to stick to the print. How can I introduce a pause into the G-code without manipulating it manually in Ultimaker Cura?</p>

<ultimaker-cura><g-code><knowledgebase>
How to pause a print to insert something in a cavity using Ultimaker Cura?
Trish
# How to pause a print to insert something in a cavity using Ultimaker Cura?

(Asked by: username_0 on 2019-07-14)

I have a model that contains a cavity, into which I want to insert a piece of metal, so I can use a magnet to stick to the print. How can I introduce a pause into the G-code without manipulating it manually in Ultimaker Cura?

**Tags:** ultimaker-cura, g-code, knowledgebase


---

## 2 answers

### Answer by username_0 on 2019-07-14. Score: 6 | Accepted answer

Ultimaker Cura contains "Extensions"; in version 4.1.0, the process is as follows:

* Extensions -> Post Processing -> Modify G-code
* Add a Script -> Pause at height
  + Choose the one that matches your firmware!
* Choose the `Pause height` to match the height the insertion should take place. Usually, this is to be the layer just before the roof is to be printed to keep the inserted objects from protruding from their cavities.
* Choose a park position well outside of the print. X 10 Y 10 is usually a good position for this.
* Add a little retraction if you want.

In printing, you have to wait till the cavity is formed, insert the item quickly and press the control button to resume. The shorter the pause, the better the next layer will hold to the already printed.

Also, keep in mind to make the cavity a little larger than the insert, both in XY and Z, to compensate for the plastic shrinking a little and to allow the nozzle to pass well over the inserted item.

> **Comments:**
> **username_1**: Note that there are different pausing scripts based on printer type; choose wisely.  
> **username_2**: Neat trick, but I get the impression that it is actually faster to pop the gcode file into np++ and add a standard line or two of code at the appropriate layer.  
> **username_0**: @username_2 finding the right line is the problem then  
> **username_2**: @username_0 once you know the layer number - which you need for the Cura tool -- it's easy to find that in the gcode file.  
> **username_0**: No @username_2 one needs the absolute height, not layer number  
> **username_2**: @username_0  why?  If you know where the first "roof" layer is, why isn't that sufficient? I've successfully placed a "pause" command that way several times when I wanted to swap filaments at a particular height in a print.  
> **username_0**: @username_2 While for convenience most people print in intervals of 0.1 mm layer height, others use intervals of 0.08 mm or something similar as that's what an exact multiple of steps on their lead screw is. In these cases, and making it independant of a layer count, knowing an absolute height is easier than converting it to the layer. With the same script setting you could print an item in 0.1 mm as well as 0.3 mm layer height without adjustment. Add to that layer 1 is often not the same as any subsequent layer.  
> **username_1**: Please note that the printer firmware must be able to handle the inserted G-codes. Please see [this answer](/a/11242), it shows that if a firmware that does not support the inserted G-codes is loaded onto the machine, the inserted Cura scripts will not work.  

---

### Answer by username_1 on 2019-11-25. Score: 3

[This answer](/a/10588/) already explains how you insert the G-codes to enable a pause into your model. But, **this will only work if the printer supports the G-codes that are inserted by Cura**. E.g. [this question](/q/11236) shows that this does not always work!

To pause the printer you would need to resort into other methods, e.g. a manually inserted [`G4` (Dwell)](https://reprap.org/wiki/G-code#G4:_Dwell) would be a viable solution as shown in [this answer](/a/11242).


---

