<p>Cura already stores all the slicer settings in the G-code file as comments.
Install a G-code file viewer or file editor plugin in OctoPrint to view the used slicer settings for that specific G-code in OctoPrint.</p>
<p>The <a href="https://plugins.octoprint.org/plugins/GcodeEditor/" rel="nofollow noreferrer">GcodeEditor plugin</a> has the ability to view the actual G-code.</p>

CC BY-SA 4.0
2023-11-07T12:18:42.457Z
I'm using two GCode Viewer Plugins but I thought they are only for visualization? https://docs.octoprint.org/en/master/bundledplugins/gcodeviewer.html and https://plugins.octoprint.org/plugins/prettygcode/.
Bob Ortiz
CC BY-SA 4.0
2023-11-07T13:09:49.663Z
GcodeEditor looks like a good candidate. https://plugins.octoprint.org/plugins/GcodeEditor/
Hacky
CC BY-SA 4.0
2023-11-09T08:05:18.403Z
Notepad. Gcode is readable as a .txt file.
Trish
CC BY-SA 4.0
2023-11-07T12:17:05.443Z
2023-11-08T15:04:39.983Z
2023-11-08T15:04:39.983Z
Hacky
<p>Non-G-code data can be embedded in G-code files, like embedded base64 encoded thumbnails. I was wondering, is there is a common way to include (at least the most important) slicer settings that were used to generate that particular G-code file?</p>
<p>I have more and more design files and sliced G-code files, in OctoPrint folders and I sometimes really want to know what settings I used to slice it. For example, after the new Cura 5.5 upgrade, I was constantly wondering, which version I used for each independent file.</p>
<p>Also, I sometimes chose a different quality (layer height) or different infill percentage or scale. I now work around it by using a self-made file naming convention that consists of this:</p>
<p><code>ObjectName_v55_n06_q028_s100_i20_a1</code></p>
<pre><code>- v Slicer Version (in my case always Cura)
- n Nozzle size (in mm)
- q Quality (Layer Height without the dot)
- s Scale percentage (0-100)
- i Infill percentage (0-100)
- a Amount (if object is multiplied)
</code></pre>
<p>But I really would like to see those things back in OctoPrint when opening a G-code file, so I can decide if I need to reslice, is there a plugin for Cura and OctoPrint, or a standardized way to save this info embedded in a G-code file and <a href="https://community.octoprint.org/t/like-to-add-custom-metadata-to-file-and-show-it-is-the-gui/37582" rel="nofollow noreferrer">show it in OctoPrint</a>?</p>

CC BY-SA 4.0
2023-11-01T00:40:35.613Z
While it is not the G-code file, a .3mf file contains all the slicer parameters and includes the 3D model. Would that fill your needs?
agarza
CC BY-SA 4.0
2023-11-01T08:25:15.810Z
I never really checked out the 3mf standard. It seems to be very interesting and what I asked for. Thanks for pointing that out. For reference: https://www.youtube.com/watch?v=BABdR9d8Cp4. Now I need to figure out and test if both OctoPrint and Marlin/Jyers for Creality Ender 3 v2 supports 3mf instead of stl. Do you know of any such solution particular for STL too?
Bob Ortiz
CC BY-SA 4.0
2023-11-01T13:22:32.693Z
Most slicers support the 3mf file format. From there, just slice the file as normal then send to your printer.
agarza
CC BY-SA 4.0
2023-11-01T13:34:00.973Z
Last comment is my mistake "instead of stl" should be "instead of gcode". But this is exactly my problem. If 3mf can't be send to printer/octo, the actual file on the printer, I just have another file to keep track of. I see the value of 3mf for archiving the model with slice settings, but if there is still a separate gcode file for the printer, it defeats the purpose and doesn't solve my issue. Which is why I need to use the naming convention unfortunately. If I send gcode, my printer or octopi won't know the settings I used and I need to search back for my 3mf file to check.
Bob Ortiz
CC BY-SA 4.0
2023-11-01T13:43:14.427Z
Wouldn't it be easier to track the 3mf files on your computer instead of saving the G-code files? If the G-code file doesn't have the settings you need, you would still have to reload the stl, adjust your settings, slice the file, and then send it to the printer.
agarza
CC BY-SA 4.0
2023-11-01T14:01:43.900Z
Definitely. However, since a gcode file is always necessary, and I have folders with gcode files only OctoPi (printer), when I quickly want to reprint something on the same machine, I want to be able to quickly know "resolution, version, amount" and that's not possible without my naming convention. Meaning going back to STL and reslicing. For example the upgrade to Cura 5.5 has quite a speed improvement, trash all 5.4 sliced gcode. Sometimes I want to print in higher or lower resolution, no way to know which it was sliced at in Octo or printer. Same for scale and amount.
Bob Ortiz
CC BY-SA 4.0
2023-11-01T14:04:34.080Z
Then it looks like implementing your file naming convention will be your solution. That will be a lot of work.
agarza
<ultimaker-cura><g-code><octoprint>
Is there a (common) way to embed used Slicer settings inside the G-code file?
Bob Ortiz
# Is there a (common) way to embed used Slicer settings inside the G-code file?

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

Non-G-code data can be embedded in G-code files, like embedded base64 encoded thumbnails. I was wondering, is there is a common way to include (at least the most important) slicer settings that were used to generate that particular G-code file?

I have more and more design files and sliced G-code files, in OctoPrint folders and I sometimes really want to know what settings I used to slice it. For example, after the new Cura 5.5 upgrade, I was constantly wondering, which version I used for each independent file.

Also, I sometimes chose a different quality (layer height) or different infill percentage or scale. I now work around it by using a self-made file naming convention that consists of this:

`ObjectName_v55_n06_q028_s100_i20_a1`

```
- v Slicer Version (in my case always Cura)
- n Nozzle size (in mm)
- q Quality (Layer Height without the dot)
- s Scale percentage (0-100)
- i Infill percentage (0-100)
- a Amount (if object is multiplied)

```

But I really would like to see those things back in OctoPrint when opening a G-code file, so I can decide if I need to reslice, is there a plugin for Cura and OctoPrint, or a standardized way to save this info embedded in a G-code file and [show it in OctoPrint](https://community.octoprint.org/t/like-to-add-custom-metadata-to-file-and-show-it-is-the-gui/37582)?

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

> **Comments:**
> **username_1**: While it is not the G-code file, a .3mf file contains all the slicer parameters and includes the 3D model. Would that fill your needs?  
> **username_0**: I never really checked out the 3mf standard. It seems to be very interesting and what I asked for. Thanks for pointing that out. For reference: https://www.youtube.com/watch?v=BABdR9d8Cp4. Now I need to figure out and test if both OctoPrint and Marlin/Jyers for Creality Ender 3 v2 supports 3mf instead of stl. Do you know of any such solution particular for STL too?  
> **username_1**: Most slicers support the 3mf file format. From there, just slice the file as normal then send to your printer.  
> **username_0**: Last comment is my mistake "instead of stl" should be "instead of gcode". But this is exactly my problem. If 3mf can't be send to printer/octo, the actual file on the printer, I just have another file to keep track of. I see the value of 3mf for archiving the model with slice settings, but if there is still a separate gcode file for the printer, it defeats the purpose and doesn't solve my issue. Which is why I need to use the naming convention unfortunately. If I send gcode, my printer or octopi won't know the settings I used and I need to search back for my 3mf file to check.  
> **username_1**: Wouldn't it be easier to track the 3mf files on your computer instead of saving the G-code files? If the G-code file doesn't have the settings you need, you would still have to reload the stl, adjust your settings, slice the file, and then send it to the printer.  
> **username_0**: Definitely. However, since a gcode file is always necessary, and I have folders with gcode files only OctoPi (printer), when I quickly want to reprint something on the same machine, I want to be able to quickly know "resolution, version, amount" and that's not possible without my naming convention. Meaning going back to STL and reslicing. For example the upgrade to Cura 5.5 has quite a speed improvement, trash all 5.4 sliced gcode. Sometimes I want to print in higher or lower resolution, no way to know which it was sliced at in Octo or printer. Same for scale and amount.  
> **username_1**: Then it looks like implementing your file naming convention will be your solution. That will be a lot of work.  

---

## 1 answers

### Answer by username_2 on 2023-11-07. Score: 1

Cura already stores all the slicer settings in the G-code file as comments.
Install a G-code file viewer or file editor plugin in OctoPrint to view the used slicer settings for that specific G-code in OctoPrint.

The [GcodeEditor plugin](https://plugins.octoprint.org/plugins/GcodeEditor/) has the ability to view the actual G-code.

> **Comments:**
> **username_0**: I'm using two GCode Viewer Plugins but I thought they are only for visualization? https://docs.octoprint.org/en/master/bundledplugins/gcodeviewer.html and https://plugins.octoprint.org/plugins/prettygcode/.  
> **username_2**: GcodeEditor looks like a good candidate. https://plugins.octoprint.org/plugins/GcodeEditor/  
> **username_3**: Notepad. Gcode is readable as a .txt file.  

---

