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 ---
. Three dashes between code segments denotes a variable update. However, some variables won't be preserevd across the split.
You can use the update()
function to preserve certain variables across the splits:
See Examples for examples.
Custom Delimiters
To split a macro by something other than ---
, you can set the delimiter
parameter in your [dynamicmacros]
config section:
To disable receiving variable updates entirely, you can set delimiter
to NO_DELIMITER
.