How can I change the macro APPLY_BUILD_SHEET_ADJUSTMENT to load a specific bed mesh profile?
I would like to BED_MESH_PROFILE LOAD of a specific sheet when apply build sheet adjustment.
[gcode_macro APPLY_BUILD_SHEET_ADJUSTMENT]
description: Applies the sheet offset adjustment for the installed build sheet, call from your PRINT_START macro
gcode:
# get the offset from saved variables
{% set svv = printer.save_variables.variables %}
{% set sheet_key = (svv["build_sheet installed"] | string) %}
{% set sheet = (svv[sheet_key] | default(None)) %}
{% if sheet %}
# log this to the console so if there is an issue with the print the user can see which sheet the printer thought it had installed
{action_respond_info("Applying offset: %.3fmm for build sheet: %s" % (sheet.offset, sheet.name))}
_BUILD_SHEETS__SET_GCODE_OFFSET Z_ADJUST={sheet.offset} MOVE=1
{% else %}
{action_respond_info("No build sheet installed, offset adjustment: 0.000mm") }
{% endif %}
Fill out above information andin all cases attach yourklippy.logfile (use zip to compress it, if too big). Pasting yourprinter.cfgis not needed Be sure to check our “Knowledge Base” Category first. Most relevant items, e.g. error messages, are covered there
Describe your issue:
Excuse me.
How can I change the macro APPLY_BUILD_SHEET_ADJUSTMENT to load a specific bed mesh profile?
I would like to BED_MESH_PROFILE LOAD of a specific sheet when apply build sheet adjustment.
[gcode_macro APPLY_BUILD_SHEET_ADJUSTMENT]
description: Applies the sheet offset adjustment for the installed build sheet, call from your PRINT_START macro
gcode:
get the offset from saved variables
{% set svv = printer.save_variables.variables %}
{% set sheet_key = (svv[“build_sheet installed”] | string) %}
{% set sheet = (svv[sheet_key] | default(None)) %}
{% if sheet %}
log this to the console so if there is an issue with the print the user can see which sheet the printer thought it had installed
Already solved.
According to the selected sheet, the parameters of the sheet are loaded from Variables.cfg
I solved it with the help of ChatGPT. It is a great helper.