Skip to content

Macros Window

Use the Macro Window to store frequently used commands for GCode-based lasers. These functions will only work when LightBurn is directly connected to a GCode-based laser.

Starting with LightBurn 2.2, you can also assign custom shortcut keys to macros. If you add a shortcut key, it will be shown on the button itself.

Screenshot of the macros window with one macro present

Use macros by either clicking on the buttons or using the assigned shortcut keys.

Accessing the Macros Window

If you have a GCode-based device selected, the Macros Window will be located in the upper right side of LightBurn, docked behind the Cuts / Layers Window by default.

If you have closed the Macros Window, go to Window → Macros to re-enable it. To restore it and all other windows to their default positions, go to Window → Reset to Default Layout.

Tip

The layout of LightBurn is highly customizable. For more information on enabling and disabling windows and toolbars, or rearranging the default layout, see Customizing the LightBurn Window.

Creating and Managing Macros

To create, edit, and rearrange macros, click the Manage button in the bottom right of the Macros Window to open the Manage Macros dialog.

This window allows you to add, edit, delete, and rearrange macros.

Screenshot of the Manage Macros dialog

Add a Macro

  1. Click Add to open the New Macro dialog.
  2. Enter a name for the button under Button Label.
  3. In the Macro Content section, enter one or more commands.
  4. If you want to add a shortcut, click or tab into the Shortcut Key field and press the key or key combination you want to use.
  5. Click OK to save the macro or Cancel to discard changes.

Shortcut key conflicts

If your shortcut key keeps disappearing before you can save it, you most likely have a conflict with an existing macro shortcut or hotkey. See Shortcut Key Conflicts for more information.

Screenshot of the New Macro dialog

Edit a Macro

Edit a macro by selecting it in the Manage Macros window and clicking Edit. From here, the process is the same as adding a new macro.

Delete a Macro

Delete a macro by selecting it in the Manage Macros window and clicking Delete.

Rearrange Macros

Change the order in which macros appear by selecting the macro you want to move and clicking Move Up or Move Down, or by clicking, holding, and dragging a macro from the list to a new position.

Shortcut Key Conflicts

When you create the shortcut key, LightBurn checks it against all your other macros for the selected device as well as all LightBurn hotkeys. If the shortcut key or key combo you've chosen conflicts with any of them, LightBurn clears the shortcut keys and displays a warning explaining what the key conflicted with.

The same check is run whenever you switch to a new device. If any shortcut clashes, it will be cleared and you will see a warning listing everything that was cleared. This can happen if you modify the LightBurn hotkeys after creating the macro.

Screenshot of the New Macro dialog with an error message warning of a key conflict

F12 is already used by "Toggle Side Panels". Shortcut cleared.

Troubleshooting

  • If you're unable to use or manage macros, make sure you've selected a GCode device profile and connected successfully to the machine.
  • If your macros don't work as expected, please check that you've entered them correctly. We recommend testing your commands in the Console Window first.
  • If your shortcut keys won't save, you probably have a conflict. See Shortcut Key Conflicts for help.