Open g33k5h0p opened 5 years ago
i am running cura 3.1, and octoprint latest version, im wondering if the latest update to octoprint is the issue , as it worked great for me up until then ?
And now? Does it give an error ? Message? Describe the issue so I could help
ERROR: Injecting GCODE failed. Replaced 0 out of 1 needed. here is without multicolor on current setup
The regular expression used?
hi, same error her ..
ERROR: Injecting GCODE failed. Replaced 0 out of 1 needed.
thats a problem with the regular expression matching the line from the slicer. you need to make sure the expression is right for your slicer
From https://www.thingiverse.com/groups/anycubic-i3-mega/forums/general/topic:27062
(you have also the procedure to print in multicolor)
On Octoprint go to settings and then "GCODE Scripts" insert this code into the mentioned fields:
After print job is paused:
M117 Print Paused G91 X # Set to relative positioning on the X axis G1 X20 # Move my bed down 15mm (or the hotend up 20mm) G90 X # Set to absolute positioning on the X axis
Before print job is resumed:
M117 Print Resumed G91 X # Set to relative positioning on the X axis G1 X-20 # Put the bed back G90 X # Set to absolute positioning on the X axis
Hit save. Then also in settings go to "Plugin Manager" and click "Get more..." In the search box type "colors" and install the Multi Colors plugin. You will find the plugin by clicking on the 4 bars / arrow down next to "Timelapse" in your Octoprint menu. For it to work with Cura 3.2.1 sliced gcode you must go to your multi color printing menu (which you just opened) hit "Advanced Options" and replace the regex (regular expression) with the following: ;LAYER:{layer}
Now you are good to go. Just use "GCode Viewer" in Octoprint to find the layers at which you want to change color. Then go back to Multi Colors and type them in separated by space. Like 125 127 to change color at layer 125 and then again at layer 127 :)
For Cura, use
;LAYER:{layer}
instead.
Try this as your regex statement.
.([LAYER])\w+.*([layer]).
Some details could be useful