Can variable_bed_mesh_profile be set in the slicer?

quandary here.... for different bed temps (printing different materials) , resulting in different meshes.... can variable_bed_mesh_profile be called from the slicer g-code to load an appropriate mesh...rather than just setting it in printer.cfg? tia
11 Replies
miklschmidt
miklschmidt14mo ago
absolutely. use SET_GCODE_VARIABLE MACRO=RatOS VARIABLE=bed_mesh_profile VALUE="'your_mesh'"
auggie
auggie14mo ago
quick question, VALUE has to be in string? in quotes? without quotes I am getting: Unable to parse 'beacon_ASA_G11' as a literal: malformed node or string:
miklschmidt
miklschmidt14mo ago
Yes if it has spaces
auggie
auggie14mo ago
i tried manually typing in console SET_GCODE_VARIABLE MACRO=RatOS VARIABLE=bed_mesh_profile VALUE=ASA1 and it returns the same error
auggie
auggie14mo ago
No description
miklschmidt
miklschmidt14mo ago
Just use quotes then
auggie
auggie14mo ago
@miklschmidt well quotes just gave me the same error. i am lost
miklschmidt
miklschmidt14mo ago
Hmm.. Seems like there's a bug in klipper, you can't use SET_GCODE_VARIABLE with strings.
miklschmidt
miklschmidt14mo ago
Ah.. not a bug, that's apparently intended. I have no idea why
No description
miklschmidt
miklschmidt14mo ago
@auggie246 this should work: SET_GCODE_VARIABLE MACRO=RatOS VARIABLE=bed_mesh_profile VALUE="'ASA1'" It makes sense now. It's parsed as a literal or else you wouldn't be able to assign anything other than strings. This way you can do all types.
auggie
auggie14mo ago
Fixed, thank you