Macros not working in custom gcode
 
Notifications
Clear all

[Solved] Macros not working in custom gcode  

  RSS
Innosek
(@innosek)
New Member
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

Posted : 15/11/2021 8:52 pm
Diem
 Diem
(@diem)
Illustrious Member

In Printer Settings, how many extruders have you specified?

Cheerio,

Posted : 15/11/2021 11:01 pm
Neophyl
(@neophyl)
Illustrious Member
RE: Macros not working in custom gcode

You may want to read this - https://github.com/prusa3d/PrusaSlicer/issues/5782

Posted : 16/11/2021 8:25 am
Innosek liked
Innosek
(@innosek)
New Member
Topic starter answered:
RE: Macros not working in custom gcode

 

Posted by: @neophyl

You may want to read this - https://github.com/prusa3d/PrusaSlicer/issues/5782

Thank you! I must've had something wrong with the beta

Posted : 16/11/2021 2:19 pm
Neophyl
(@neophyl)
Illustrious Member
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 ?

Posted : 16/11/2021 8:26 pm
Share: