Skip to content

Variable Text

Use Variable Text to have LightBurn automatically substitute specially formatted expressions with alternate data when you output a project to your laser.

In addition to outputting alternate text when you Start or Send a project to your laser, the expressions will be replaced when you Preview, save a project in machine-specific format, or Export graphics in SVG, DXF, or AI format.

You can use Variable Text to replace special expressions with:

  • Date or time stamps
  • Entries in a CSV file
  • Serial numbers
  • Cut Settings

See Variable Text Formatting for full details on supported formatting expressions.

Selecting a Variable Text Mode

To create Variable Text, first use the Create Text tool to enter the appropriate expressions for the type data you'd like to output, then select the matching Text Mode from the dropdown menu in the Text Options Toolbar.

Select Date/Time (for date and time stamps), Merge/CVS (for entries in a CSV file), Serial Number, or Cut Setting.

Variable Text mode dropdown menu

If you select Merge/CVS or Serial Number formatting, you'll have additional controls available in the Variable Text Window.

Accessing the Variable Text Window

The Variable Text Window is not enabled by default. To enable it, go to WindowVariable Text.

The Variable Text Window will appear docked behind the Cuts / Layers Window on the upper right side of your screen. Click the Variable Text tab to bring the Variable Text Window to the front.

Variable Text Window tab next to other docked window tabs

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.

Variable Text Window Options

Click any option in the image below to jump directly to the relevant section for that option, or scroll down for a list of options and descriptions.

Current

Determines the serial number or row from a CSV file that will be substituted in place of the formatted expressions the next time the project is output.

Start

Determines the first serial number or row from a CSV file to be output.

Warning

For values other than 0, on the first run of a project you must Reset the Current value to the Start value, or the values will not match. The Current and Start values are only matched automatically when advancing forward from the End value, returning to the beginning of the sequence.

End

The last serial number or row from a CSV file to output, before advancing back to the Start value.

Note

The Current value advances between the Start and End values. In other words, the sequence returns to the Start value when increasing beyond End, or to the End value when decreasing beyond Start.

Advance By

Tells LightBurn how many entries to advance (or reverse) the Current value each time you click Next or Previous.

Auto-Advance

When enabled, tells LightBurn to advance the Current value by the amount entered in the Advance by field each time you Start, Send, or save a project in machine-specific format.

Previous

Decreases the Current value by the amount set in the Advance by field.

Next

Decreases the Current value by the amount set in the Advance by field.

Reset

Resets the Current value to the Start value.

Test

Displays the text that will be output in place of the formatted expressions, for as long as the button is held.

Variable Text Window Test button

Bake

Converts the formatted expressions to whatever data would be output based on the Current value in the Variable Text Window, in your Workspace.

The Baked text will no longer increment as a Variable Text Object — the displayed text is exactly what will be output to your laser.

Browse

Opens your systems's file browser, where you can navigate to and load a CSV file saved to your computer. The name of the CSV file will display in the Variable Text Window after it has been loaded.

Clear

Unloads a previously loaded CSV file.

Variable Text Offsets

Text Objects in LightBurn have an adjustable property called Offset, available in the Text Options Toolbar. Using Offsets allows you to use the same formatting expression to output different data.

The Offset value is added to the Current value in the Variable Text Window when LightBurn evaluates the Text Object to determine the data to output in its place.

For example, if you applied an Offset of 2 to a Text Object formatted to output a serial number, with a Current value of 1000, the output serial number will be 1002.

Serial number Offset demo

Tip

Use the Offset value in conjunction with the Advance by value to increment batches of the same design using Variable Text. For instance, if you created a design with 4 name tag labels on the page, you would set the Offset value for the four labels to 0, 1, 2, and 3, and set the Current value to Advance by 4 with each run.

Automatic Offsets

Some LightBurn tools can apply automatically advancing Offset values to duplicated objects.

Use Grid Array, Circular Array, or Copy Along Path to lay out copies of designs while increasing the Offset of each copy by a specified amount.

  • Grid Array Auto-increment Offset demo
  • Grid Array Auto-increment Offset demo Preview

Shape Properties and Variable Text

There are three settings in the Shape Properties Window that are useful when working with Variable Text.

Variable Text Shape Properties

  • Max Width sets the maximum possible width of selected Text Objects — use this field to prevent Variable Text outputs from exceeding a specified width after they're converted from formatted expressions.

  • The Squeeze toggle determines whether Text Objects will be rescaled in both directions in order to fit within the Max Width value.

    When enabled, text will be shrunk horizontally, if necessary to stay within the Max Width, but maintain the same height.

    When disabled, text will be shrunk proprotionally, both horizontally and vertically.

  • Ignore Empty Vars instructs LightBurn to remove newlines preceding empty Variable Text fields when aligning text.

Max Width and Squeeze Demonstration


For more help using LightBurn, please visit our forum to talk with LightBurn staff and users, or email support.