<p>In addition to this question: <a href="https://3dprinting.stackexchange.com/questions/21563/is-there-a-common-way-to-embed-used-slicer-settings-inside-the-g-code-file">Is there a (common) way to embed used Slicer settings inside the G-code file?</a>.</p>
<p>I'm considering writing a Cura script and OctoPrint plugin because what I want seems to be not available. I suggest adding, for example, a Base64 encoded JSON array with metadata (see <a href="https://3dprinting.stackexchange.com/questions/21563/is-there-a-common-way-to-embed-used-slicer-settings-inside-the-g-code-file">previously mentioned question</a>) into each generated G-code that then can be read by the OctoPrint plugin (or, even better, understood in the Marlin firmware).</p>
<p>Related to that, I would want OctoPrint, or the Marlin firmware, to know the installed nozzle size. That way, my OctoPrint plugin (or the firmware) can check and match the installed nozzle size versus the nozzle size used for slicing that G-code. If mismatched, prevent the printer from printing, advise to reslice, or warn about the mismatch.</p>
<p>As we speak, I'm printing a physical nozzle size indicator, a physical &quot;label&quot; hanging on my printer. That's ridiculous and should be in the software.</p>
<p>I couldn't find such features in OctoPrint and Marlin documentation. This would be a great addition as it prevents errors and facilitates what some more expensive printers with &quot;easy nozzle change&quot; can do automatically.</p>
<p><strong>First side-note</strong>: This could be easily implemented in a cross-compatible way with Prusa/Cura/Octo/Marlin, et cetera because a fundamental data structure containing the mentioned metadata (other question) is easy to implement for all without having compatibility issues.</p>
<p><strong>Second side note</strong>: The same concept can also be applied to the filament color installed. If you can set the desired color in the metadata inside the G-code and the printer knows which color is installed, it can warn about mismatches.</p>

CC BY-SA 4.0
2023-11-27T09:34:49.573Z
I regularly print 0.8 mm with a 0.4 mm nozzle without a problem, so what are the errors you encounter. This question is not very clear. How many printers do you have to worry about the nozzle sizes? Maybe the following is a good read for you: [Where can I change the nozzle diameter in Cura? Why is mine missing?](https://3dprinting.stackexchange.com/questions/19400/where-can-i-change-the-nozzle-diameter-in-cura-why-is-mine-missing)!
0scar
CC BY-SA 4.0
2023-11-27T09:43:22.033Z
I have only one printer, I don't print too regularly, so I kept forgetting which nozzle I installed, hence the physical nozzle indicator. The issue is my g-code files are saved in OctoPrint, and they don't contain easily visible information about which settings it was sliced with (for a .2, .4, .8 nozzle) and for what layer height. I sometimes want to reprint something I already sliced with another nozzle size for higher quality or for faster printing speeds. If Octo or Marlin knows what size is installed, and the g-code contains this info, too, it can be matched and warn about a mismatch.
Bob Ortiz
CC BY-SA 4.0
2023-11-27T09:45:53.413Z
I know how to change the nozzle diameter and layer height in Cura, and I usually end up reslicing it (meaning I lose scaling and other custom settings I've used for a particular object). My issue is with properly documenting what settings are used in a machine-readable format that can be used smartly by Octo or Marlin, the same for filament color, sliced in blue but red installed, warning (that can be ignored).
Bob Ortiz
CC BY-SA 4.0
2023-11-27T10:37:39.927Z
I usually make a folder structure in my OctoPrint storage  where I distinguish the prints based on the material (PLA, generic PETG, NGEN, Nylon, etc.) you could do the same for nozzle diameter, once stored in that specific location you instantly see what the code was meant for. I wonder why you change nozzles frequently I've printed more than 10 years with the (now CHT) 0.4 mm nozzle, which is capable of printing wider. I used to put the most important setting in the G-code file name, that is also a solution.
0scar
CC BY-SA 4.0
2023-11-27T10:46:41.950Z
That's my solution for now https://3dprinting.stackexchange.com/questions/21563/is-there-a-common-way-to-embed-used-slicer-settings-inside-the-g-code-file but it doesn't feel like a techy solution as of 2023, there should be better options to achieve it. I change nozzles often between .4 and .6 because of the huge speed difference. A 0.6mm nozzle at 0.32 or even at 0.20 layer height is fine for most prints and gives a huge speed benefit over using 0.4mm nozzle at 0.20 layer height. But sometimes I do need more detail and switch back to the slower 0.4mm nozzle with .20/.16/.12 layer height.
Bob Ortiz
<marlin><ultimaker-cura><g-code><nozzle><octoprint>
Is there a way to set the installed nozzle size (and installed filament color) in the Marlin firmware (or OctoPrint software)?
Bob Ortiz
# Is there a way to set the installed nozzle size (and installed filament color) in the Marlin firmware (or OctoPrint software)?

(Asked by: username_0 on 2023-11-05)

In addition to this question: [Is there a (common) way to embed used Slicer settings inside the G-code file?](https://3dprinting.stackexchange.com/questions/21563/is-there-a-common-way-to-embed-used-slicer-settings-inside-the-g-code-file).

I'm considering writing a Cura script and OctoPrint plugin because what I want seems to be not available. I suggest adding, for example, a Base64 encoded JSON array with metadata (see [previously mentioned question](https://3dprinting.stackexchange.com/questions/21563/is-there-a-common-way-to-embed-used-slicer-settings-inside-the-g-code-file)) into each generated G-code that then can be read by the OctoPrint plugin (or, even better, understood in the Marlin firmware).

Related to that, I would want OctoPrint, or the Marlin firmware, to know the installed nozzle size. That way, my OctoPrint plugin (or the firmware) can check and match the installed nozzle size versus the nozzle size used for slicing that G-code. If mismatched, prevent the printer from printing, advise to reslice, or warn about the mismatch.

As we speak, I'm printing a physical nozzle size indicator, a physical "label" hanging on my printer. That's ridiculous and should be in the software.

I couldn't find such features in OctoPrint and Marlin documentation. This would be a great addition as it prevents errors and facilitates what some more expensive printers with "easy nozzle change" can do automatically.

**First side-note**: This could be easily implemented in a cross-compatible way with Prusa/Cura/Octo/Marlin, et cetera because a fundamental data structure containing the mentioned metadata (other question) is easy to implement for all without having compatibility issues.

**Second side note**: The same concept can also be applied to the filament color installed. If you can set the desired color in the metadata inside the G-code and the printer knows which color is installed, it can warn about mismatches.

**Tags:** marlin, ultimaker-cura, g-code, nozzle, octoprint
> **Comments:**
> **username_1**: I regularly print 0.8 mm with a 0.4 mm nozzle without a problem, so what are the errors you encounter. This question is not very clear. How many printers do you have to worry about the nozzle sizes? Maybe the following is a good read for you: [Where can I change the nozzle diameter in Cura? Why is mine missing?](https://3dprinting.stackexchange.com/questions/19400/where-can-i-change-the-nozzle-diameter-in-cura-why-is-mine-missing)!  
> **username_0**: I have only one printer, I don't print too regularly, so I kept forgetting which nozzle I installed, hence the physical nozzle indicator. The issue is my g-code files are saved in OctoPrint, and they don't contain easily visible information about which settings it was sliced with (for a .2, .4, .8 nozzle) and for what layer height. I sometimes want to reprint something I already sliced with another nozzle size for higher quality or for faster printing speeds. If Octo or Marlin knows what size is installed, and the g-code contains this info, too, it can be matched and warn about a mismatch.  
> **username_0**: I know how to change the nozzle diameter and layer height in Cura, and I usually end up reslicing it (meaning I lose scaling and other custom settings I've used for a particular object). My issue is with properly documenting what settings are used in a machine-readable format that can be used smartly by Octo or Marlin, the same for filament color, sliced in blue but red installed, warning (that can be ignored).  
> **username_1**: I usually make a folder structure in my OctoPrint storage  where I distinguish the prints based on the material (PLA, generic PETG, NGEN, Nylon, etc.) you could do the same for nozzle diameter, once stored in that specific location you instantly see what the code was meant for. I wonder why you change nozzles frequently I've printed more than 10 years with the (now CHT) 0.4 mm nozzle, which is capable of printing wider. I used to put the most important setting in the G-code file name, that is also a solution.  
> **username_0**: That's my solution for now https://3dprinting.stackexchange.com/questions/21563/is-there-a-common-way-to-embed-used-slicer-settings-inside-the-g-code-file but it doesn't feel like a techy solution as of 2023, there should be better options to achieve it. I change nozzles often between .4 and .6 because of the huge speed difference. A 0.6mm nozzle at 0.32 or even at 0.20 layer height is fine for most prints and gives a huge speed benefit over using 0.4mm nozzle at 0.20 layer height. But sometimes I do need more detail and switch back to the slower 0.4mm nozzle with .20/.16/.12 layer height.  

---

## 0 answers

