What's new
VORON Design

Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members!

List of possible parameters.

Mike Eitel

Well-known member
I might be to dumm
.
Does anyone can give me a hint to find

1. a list of all possible params. to be used in macros? and
2. is there a possibility to request all this values that klipper "see's" in a given moment ?

Requested google and klipper-doc but .....
 
Found a nice macro here: https://ellis3dp.com/Print-Tuning-Guide/articles/useful_macros/dump_variables.html
I have used it and it works just fine.

Code:
[gcode_macro DUMP_VARIABLES]
gcode:
    {% set filter_name = params.NAME|default('')|string|lower %}
    {% set filter_value = params.VALUE|default('')|string|lower %}
    {% set show_cfg = params.SHOW_CFG|default(0)|int %}
    
    {% set out = [] %}

    {% for key1 in printer %}
        {% for key2 in printer[key1] %}
            {% if (show_cfg or not (key1|lower == 'configfile' and key2|lower in ['config', 'settings'])) and (filter_name in key1|lower or filter_name in key2|lower) and filter_value in printer[key1][key2]|string|lower %}
                {% set dummy = out.append("printer['%s'].%s = %s" % (key1, key2, printer[key1][key2])) %}
            {% endif %}
        {% else %}
            {% if filter_name in key1|lower and filter_value in printer[key1]|string|lower %}
                {% set dummy = out.append("printer['%s'] = %s" % (key1, printer[key1])) %}
            {% endif %}
        {% endfor %}
    {% endfor %}
    
    {action_respond_info(out|join("\n"))}
 
Macros can be extremely potent (Checkout KAMP as an example). The Official klipper documentation on macros covers a large number of data items that can be used in macros. How to manipulate the data is covered in the Jinga documentation. Ellis's useful macros are good examples to study when starting on macro generation.
 
Top