Someone can correct me, but I don’t think the “insert g-code” supports the macro language. Just try M104 S195. Works for me according to the temperature preview.
G-code does not have macros like you are trying to use, you need studio to pre-process them but you are inserting them too late into the g-code rendering pipeline. (again, just assuming from my tests both ways)
Thanks all. So I guess my alternative is that I could add layer change logic (and key off a specific layer) in custom printer gcode. I may try that approach.
Be mindful that Bambu Labs may be using custom g-code as a way of protecting their IP from being copied.
I have seen more than one instance of someone throwing their printer into a tailspin trying to modify g-code in P Series printers and probably the same has happened with the other models