While there are a fair few 3D printing interfaces available on the Internet for free right now, the name OctoPrint is the one that comes to mind in most cases, which we can consider to be the go-to interface for most 3D printing enthusiasts.
What really puts OctoPrint ahead of its competitors is its plugin support, which allows all the members of the 3D printing community to develop their own plugins to add the functionality they would like to see in OctoPrint, and share them through OctoPrint’s plugin library.
In today’s article, we will find out if it’s possible to directly view G-code in OctoPrint, which is a feature that allows us to understand how the print will look on a layer-by-layer basis before actually starting the printing process.
So, does OctoPrint feature a G-code viewer?
OctoPrint does indeed come with a built-in G-code viewer you can use to preview the state of your print on a layer-by-layer basis, which you can access by clicking the G-Code Viewer tab at the top of the OctoPrint dashboard.
Next up, we will go into the G-code viewing capabilities of OctoPrint in greater detail, find out how we can fix the issue of the G-Code viewer not showing in OctoPrint, and learn how to install and use the PrettyGCode plugin for OctoPrint.
Table of Contents
Does OctoPrint Feature a G-Code Viewer?
While it’s possible to find a multitude of G-Code viewers that run directly on the browser, having the feature implemented to OctoPrint is inarguably a much better experience as it allows you to have everything in one place.
OctoPrint features a built-in G-Code viewer that you can access with a simple click of the button from the OctoPrint dashboard, under the G-Code Viewer tab, close to the top of the window.
While the G-code viewer is actually a plugin that you can disable if you wish to, it has been a part of OctoPrint for a while now, coming in pre-installed and pre-enabled as a part of the software.
The built-in G-Code viewer in OctoPrint allows you to preview the layers of your print in 2D, which you can utilize as soon as you load a model into OctoPrint for printing.
How to Use the G-Code Viewer Plugin for OctoPrint?
The G-Code Viewer plugin for OctoPrint features a pretty simple interface that allows users to preview every single step of the 3D printing process with the press of a few buttons.
Once you navigate to the G-Code Viewer tab in OctoPrint, you will be greeted with OctoPrint’s G-code viewer interface, which features two sliders, two buttons, some checkboxes, and some information about the model you have imported.
Below, we have listed the purpose of each slider and button, along with a checkbox that we think is significant for usage:
- Bottom Slider – The bottom slider allows you to control the progress of the layer you’re currently on, allowing you to see the different states of the print as that layer is being printed.
- Right Slider – The right slider allows you to choose the layer you’re previewing, which instructs the G-code viewer to show all layers that the 3D printer would have printed up to that point.
- Prev/Next Layer Buttons – The prev/next layer buttons have the same purpose as the right slider, allowing you to jump between different layers one step at a time.
- Sync with Job Progress Checkbox – The sync with job progress checkbox causes the G-code viewer to display the layer the 3D printer is currently printing, allowing you to track the layers in real-time.
While you will find more checkboxes that configure the G-code viewer in different ways, we believe the text of these checkboxes to be pretty self-explanatory.
OctoPrint G-Code Viewer not Showing Image – What to Do?
While it’s not common, some users have reported that they cannot utilize the G-Code Viewer on OctoPrint, which can be due to numerous reasons.
If the G-Code Viewer is not working as intended on your OctoPrint, we recommend trying the solutions we have listed below:
- Ensure that the G-Code Viewer plugin is active. If you don’t see the G-Code viewer tab in your OctoPrint dashboard, this is the most likely culprit. You can quickly activate the plugin once again by navigating to the Plugin Manager.
- Ensure that you have loaded the model. The G-code viewer will only operate if you have loaded a model into OctoPrint, which you can do by clicking the Load button that corresponds to the model you want to load from the Files menu.
- Ensure that you aren’t printing from an SD card. The G-code viewer won’t work for models that you are printing from the SD card, as OctoPrint will not have access to the model in this case.
- Check the “Center Viewport on Model” checkbox. If you’re seeing an empty screen (no grid) on the G-code viewer, there is a good chance that the viewing area is scrolled away from the viewport for some reason. Clicking this checkbox will re-center the viewport and allow you to see the print area.
More often than not, the solutions should get your OctoPrint G-code viewer in working order.
How to Install the PrettyGCode Plugin for OctoPrint?
The PrettyGCode plugin is a community-made addition to OctoPrint’s G-Code viewing capabilities, which adds a more modern G-Code viewer that allows you to view the G-Code in 3D, similar to Cura’s Layer View.
To install the PrettyGCode Plugin for OctoPrint with the OctoPrint Plugin Manager, you can follow the steps below:
- Click the wrench icon on the top-right corner of OctoPrint.
- Navigate to the Plugin Manager tab from the left pane.
- Click the Get More button on the top-right corner of the OctoPrint settings window.
- Type “PrettyGCode” into the search input.
- Click the Install button that shows up next to the PrettyGCode plugin entry, and wait for the installation to be complete.
- Close the Plugin Installer dialog, and click the small slider icon next to the PrettyGCode entry to enable the plugin.
- Restart the OctoPrint server.
- Access the PrettyGCode plugin by clicking the “three lines” icon next to the rest of the default tabs and choosing the PrettyGCode option from the list.
On the other hand, if you would like to install the PrettyGCode Plugin for OctoPrint via the command line, here is a step-by-step guide you can follow:
- Navigate to the PrettyGCode plugin page.
- Copy the block of text under the Command Line label located on the right side of the window.
- Paste the text you have copied into the command line of the device the OctoPrint server is running on.
- Enable the plugin by navigating to the Plugin Manager in the OctoPrint dashboard.
- Restart OctoPrint.
While OctoPrint offers a few different methods to install plugins, the common point between all of these methods is that they all allow you to install a plugin effortlessly within the span of a few seconds.
A G-code viewer is, without a doubt, a feature that improves the 3D printing experience by a large margin, and having direct access to it in OctoPrint, without the need for any external software, takes the experience even further.
To quickly recap, you can find the built-in G-code viewer that allows you to inspect your models on a layer-by-layer basis by clicking the G-Code Viewer tab on the OctoPrint dashboard, which you can use without any external plugins.
On the other hand, if you would like something more advanced and modern, we recommend using the PrettyGCode plugin for OctoPrint that brings a 3D G-code viewer to the table. While it is an external plugin that requires installation, the process of installing it is incredibly straightforward with OctoPrint’s plugin manager.
Mike started his 3D printing journey with the Anet A8 when it first came out back in 2017, and has been obsessed with 3D printers ever since. Nowadays, he primarily uses his Ender 3 to print functional parts that make his life more convenient whenever possible.