# Help with Macro: SET\_GCODE\_VARIABLE doesnt set my variable

**URL:** <https://klipper.discourse.group/t/help-with-macro-set-gcode-variable-doesnt-set-my-variable/11014>\
**Category:** General Discussion\
**Created:** [October 16, 2023, 6:16pm UTC](https://klipper.discourse.group/t/help-with-macro-set-gcode-variable-doesnt-set-my-variable/11014 "2023-10-16T18:16:59Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![EddyMI3D](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/eddymi3d/32/1981_2.png) [@EddyMI3D](https://klipper.discourse.group/u/EddyMI3D)\
**Post date:** [October 17, 2023, 6:23am UTC](https://klipper.discourse.group/t/help-with-macro-set-gcode-variable-doesnt-set-my-variable/11014/4 "2023-10-17T06:23:38Z")

</div>

Honestly?

You included 3D model gcode files into your printer.cfg?

That is anything but good.

- It blows up the config file for no reason.
- If there is a issue, you can’t cancel them because a macro can’t be cancelled.

* * *

For your issue:

> [@Using gcode variables doesn't work](https://klipper.discourse.group/t/using-gcode-variables-doesnt-work/6530):
>
> Hi. I am working on a set of macros, were I set a gcode variable in one macro (read as parameter of the macro call and stored in a gcode variable using the SET\_GCODE\_VARIABLE command), so that it can be used in a set of other macros. The intention is that the value of the gcode variable is temporarily saved for use in other macros until I call the macro to set the gcose variable again and potentially change it. After the call to change the gcode variable, the other macros should consider the ne…

---

_[View the full topic](https://klipper.discourse.group/t/help-with-macro-set-gcode-variable-doesnt-set-my-variable/11014)._
