GCode Viewer Plugin¶
Changed in version 1.4.1.
The GCode Viewer plugin provides a GCode viewer based on Alex Ustyantsev’s work.
Fig. 17 An example of the GCode Viewer in action.¶
The viewer has been included in OctoPrint ever since the first releases back in 2013, however as of OctoPrint 1.4.1 it has been extracted into its own bundled plugin.
Configuring the plugin¶
The plugin supports the following configuration keys:
mobileSizeThreshold: Maximum file size for which the GCode Viewer will automatically load the file for preview on mobile devices. If the file exceeds this threshold, the user will be asked for confirmation before loading. Defaults to2MB.sizeThreshold: Maximum file size for which the GCode Viewer will automatically load the file for preview on desktop. If the file exceeds this threshold, the user will be asked for confirmation before loading. Defaults to20MB.skipUntilThis: If this string is provided the GCode Viewer will search for this string, and if found, skip all gcode up until this string. This can be used to skip prime nozzle gcode in the preview
Source Code¶
The source of the GCode Viewer plugin is bundled with OctoPrint and can be
found in its source repository under src/octoprint/plugins/gcodeviewer.