Macros not working in custom gcode
I'm trying to write a custom color change gcode. The temperature is supposed to set to zero when the print pauses, and then set the nozzle temperature back to normal after resuming the print. One line reads:
M104 S{temperature[0]}
After exporting the gcode, {temperature[0]} should be replaced with the nozzle temperature set in the filament profile, 205. Instead, the expression is not evaluated, and the gcode contains the line exactly as shown above.
It seems that Macros do work in the sections "Start G-code," End G-code," "Before layer change G-code," and "After layer change G-code," and macros do not work in "Color Change G-code," "Pause Print G-code," and "Template Custom G-Code".
The knowledge base page about macros doesn't specify that macros only work in some custom g-codes. Is this a bug, an unfinished feature, or am I doing something wrong? I've tried in both version 2.3.3. and the 2.4.4 beta.
Best Answer by Neophyl:
You may want to read this - https://github.com/prusa3d/PrusaSlicer/issues/5782
In Printer Settings, how many extruders have you specified?
Cheerio,
RE: Macros not working in custom gcode
You may want to read this - https://github.com/prusa3d/PrusaSlicer/issues/5782
RE: Macros not working in custom gcode
You may want to read this - https://github.com/prusa3d/PrusaSlicer/issues/5782
Thank you! I must've had something wrong with the beta
RE: Macros not working in custom gcode
I remembered seeing the post initially on github when it was opened so I did a quick search in the hope it might help out. I didn't check what version the commit was done for though - sorry, was at work 🙂 . Is the fix in the beta release ?