Receiving Variable Updates
Unlike normal gcode_macro
s, Dynamic Macros supports receiving variable updates within the same macro. For example, the following macro will show the same output in both M117
s:
However, this macro will show different outputs based on the current Z position of the toolhead:
Notice the large whitespaces. Three newline characters (two blank lines) between code segments denotes a variable update. However, some variables won't be preserevd across the whitespace.
You can use the update()
function to preserve certain variables across the whitespaces:
See Examples for examples.
Custom Delimeters
To split a macro by something other than three empty lines, you can set the delimeter
parameter in your [dynamicmacros]
config section:
To disable receiving variable updates entirely, you can set delimeter
to NO_DELIMETER
.