Skip to content

Drawing

Variable text

Number, date or personalize parts: date and time codes, serial numbers, CSV merge, literals, maximum width, the counter, and series machining by job or by page.

A variable text keeps codes that Dusty replaces with values when it produces an output: toolpaths and preview, saved G-code, job sent to the machine, exported drawing (SVG, DXF, PDF). The drawing keeps the codes; use it to number plates, date parts or engrave a list of names. In the text settings (Shapes panel, or Drawing panel in Studio), Variable text chooses the mode:

  • Normal: the text as typed;
  • Date and time: day d, dd, day name ddd (short) or dddd; month M, MM, MMM or MMMM; year yy or yyyy; ISO week w (ww on two digits) and W (year/week, 2026/43); hours H, HH (0 to 23) or h, hh (1 to 12 if the text contains AP, A, ap or a, replaced by AM/PM or am/pm); minutes m, mm; seconds s, ss; milliseconds zzz (z without trailing zeros); time zone t. Example: dd/MM/yyyy HH:mm → 19/10/2026 16:05. Names follow the language of the interface; the time is the device’s at the moment of the output;
  • Serial number: a run of d (decimal), h (lowercase hexadecimal) or H (uppercase) is replaced by the counter; as many digits as letters (dd with 1234 gives 34), padded with zeros if a 0 comes first (0dddd → 01234). One number per text, of a single kind: ddd-ddd or ddhh output “bad serial format”, reported in the Variable Text window;
  • CSV merge: %0, %1… are replaced by columns 0, 1… of the current row of the loaded CSV file (the first row of the file is row 0); a missing column gives an empty text.

Literals

In all three modes, a passage between apostrophes is copied as is, even if it contains code letters ('Lot' 0ddd → Lot 042, 'Made at' HH'h'mm → Made at 16h05); two apostrophes give one apostrophe (O''Neil). A code letter in an unprotected word is replaced: protect the words of the text.

Offset (text settings): added to the counter for this text only. With a counter at 1000, four labels with offsets 0, 1, 2 and 3 output 1000 to 1003; with Advance by 4, the next sheet outputs 1004 to 1007.

Maximum width (text settings): a wider text is reduced to this width (0: none); Squeeze width only keeps its height, unchecked the whole text is scaled down, proportionally (straight text). Useful when the length of a name or a number changes from one part to the next.

Variable Text window (Drawing › Variable Text…, also in the Shapes menu of the toolbar):

  • Counter: Current value (serial number, or CSV row of the next output), Start and End (past the end, the counter goes back to the start, and the other way round), Advance by (the step); Back, Next, Reset (back to the start);
  • Advance after each successful output: the counter moves one step after a job that ran to completion, a saved G-code or drawing, or baked texts. A job stopped, in alarm or whose link was lost does not use up a number; neither does the preview;
  • CSV file: Load… reads a file separated by commas, semicolons (French spreadsheets) or tabs, quoted fields included; UTF-8 preferably — an “ANSI” file from Windows is read as Windows-1252, accented letters included, with a warning. The window shows the name of the file, its rows and columns, and the current row. Clear unloads it. Ignore empty variables: a line of the text whose fields are empty disappears;
  • Values: the value of each variable text at the next output (those of the selection first) and the problems (bad serial format, merge without a file, missing row); Test shows the values on the canvas instead of the codes, as long as the box is checked;
  • Bake Selection, Bake All: the variable texts become ordinary texts with their current value (what is shown is what will be machined); with auto-advance, the counter moves on in the same undoable action.

The counter and the CSV file are saved with the project; they are shared by all its pages. Variable barcodes and 2D codes follow the same rules.

Series machining, in two ways:

  • one job per record: check Advance after each successful output, then run one job per part. At the end of each job that ran to completion, the counter moves on to the next record (the console notes it): change the stock, run again. An interrupted job is resumed or run again with the same number;
  • all pages at once: in the window, choose the number of pages (200 at most; the first names are shown), then Create One Page per Record. The pages are added after the open page: copies of it (drawing, settings, operations) whose variable texts are baked to the value of their record, and named after it; the counter moves on to the next record, in a single undoable action. File › Save G-code… › All pages then writes the G-code of each page in a folder named after it; the template page, which keeps its codes, is skipped.

Arrays number their copies: Auto-increment variable text (Grid Array and Circular Array sheets) adds the step to the offset of each copy — a sheet of 24 numbered labels in one go.

Differences with MillMage: the counter does not advance on preview or when a job starts, but at the end of a job that ran to completion (a stopped job does not lose a number); “Test” is a checkbox rather than a button to hold down; squeezing is set on the text and empty lines for the whole project.

This manual is also built into Dusty: press F1, or open the Help menu, to read the topic for what you are doing. A mistake, a missing answer? Tell us

Try it in Dusty, for free.

Free CNC milling software: design, toolpaths and machine control. Mac, iPad, iPhone, Windows and Linux.