Skip to content

CNCJob Object

Marius Stanciu edited this page Oct 29, 2026 · 1 revision

A CNCJob object holds G-code: the text that a CNC machine runs. It is made by a plugin (Drilling, Milling and others) or opened from a G-code file. The object draws the moves of the G-code on the canvas, gives the travel distance and the estimated time, and saves the G-code.

Where to find it

  • Made by the Drilling plugin (from an Excellon object) and the Milling plugin (from a Geometry object). Each job is a new CNCJob row.
  • File > Open > Open G-Code (opens a .nc, .gcode or similar file). The file becomes a CNCJob object. Its text is the file.
  • Project tree: a CNCJob row. The title of its Properties tab is CNC Job Object.
  • Use the GCode Editor button in the Properties tab to read and change the G-code. See GCode Editor.

Screenshot placeholder: images/CNCJob-Object-1.png - the Properties tab of a CNCJob object with the Estimated time rows and the Save and Review buttons visible.

Quick start

  1. Make a job with Drilling or Milling. The CNCJob row is added to the Project tree.
  2. Select the CNCJob row. Check the Travelled distance and the Estimated time in the Parameters frame.
  3. Set Plot Options to Travel to see the moves above the material, or to Cut to see the cutting moves.
  4. Click Save to write the G-code to a file. Choose a file name and a file type in the dialog.
  5. Click the Review button (magnifier icon). The G-code opens in the GCode Editor, so you can read it before you save it. See GCode Editor.

Parameters

General Information (Plot Options)

Parameter Description Default
All (radio button) Draws all moves: the travel moves and the cut moves. Set by cncjob_plot_kind = all
Travel (radio button) Draws only the travel moves: the moves above the work piece, without cutting. -
Cut (radio button) Draws only the cut moves: the moves that cut into the material. -
Name (text box) The object name in the project. Press Enter to apply. When you save the G-code, the name of the file is used as the name of the object. Object name
GCode Editor (button) Starts the GCode Editor for this object. -
INFO (toggle button) Shows or hides the attribute tree of the object. Hidden

Parameters

Parameter Description Default
Travelled distance (text box, with units) The total travelled distance on the X-Y plane, in the current units. It is shown only when the job has a travel distance (a job made by a plugin). -
Estimated time (text box, with units) The estimated time to do the routing and drilling. The time of the ToolChange events is not included. It is shown with the travelled distance. -
Use CNC Code Snippets (check box) When on, the snippets for the start and the end of the G-code are added: the prepend and append snippets from the Preferences. Changing the check box makes the G-code again. On when a snippet is set in the Preferences; otherwise off
Display Annotation (check box) Shows a number at each end of each travel line on the canvas, in order. On (cncjob_annotation)

CNC Tools Table

Parameter Description Default
Plot Object (check box) Shows or hides the object on the canvas. On (cncjob_plot)
CNC tools table - # The tool number. -
CNC tools table - Dia The tool diameter. -
CNC tools table - Offset The kind of offset of the tool. -
CNC tools table - Job The job type of the tool. -
CNC tools table - Shape The tool shape. -
CNC tools table - P (check box per row) Shows or hides the moves of this tool on the canvas. On
Excellon tools table - #, Dia, Drills, Slots, Cut Z, P The tools of a drilling job. Columns: tool number, diameter, number of drills, number of slots, cut depth and the plot check box. -
Tool Dia (text box) The tool diameter that is used to draw the moves on the canvas. In mm (or inch). Range 0 to 10000. 0.125 (cncjob_tooldia)
Update Plot (button) Reads the form and plots the object again with the selected Plot Options and the Tool Dia. -

Plugins

Button Result Page
Levelling Opens the Levelling tool. It makes new G-code with the paths corrected for the height map. Levelling
GCode sender Opens the G-code sender. It streams the G-code to a GRBL controller. GCode Sender

Export

Button Result
Save Opens the save dialog for the G-code. The file types depend on the preprocessor (see Advanced).
Review (magnifier icon) Opens the GCode Editor with the G-code of this job, to read it before you save.

Context menu

Right-click a CNCJob row in the Project tree. See Objects Overview. The Join entries make Gerber, Excellon or Geometry objects, not G-code. Use the Save button to write the G-code.

Advanced

Source text and snippets

  • The job keeps its G-code in the source text. The Save button and the Review button use the source text.
  • The snippets of Use CNC Code Snippets come from the Preferences: the prepend (start) snippet and the append (end) snippet. See Preferences-CNCJob.
  • Changing the check box makes the source text again. If you edited the G-code in the GCode Editor, the program asks before the edits are discarded.
  • A job opened from a G-code file keeps the text of the file. The snippets are added only when the check box is on.

Transformations and regeneration

  • A flip, rotate, skew or move of the CNCJob changes the G-code text. The source text is then made again, so the saved file matches the canvas.
  • For an imported G-code file, the transform rewrites the text of the file.

Travel and time

  • The travelled distance and the estimated time are computed from the moves of the G-code. The estimate does not include the ToolChange time.

File types

  • The Save dialog offers the file types of the Preferences (cncjob_save_filters). Default: .nc, .din and .dnc.
  • Some preprocessors give other file types: a Roland preprocessor saves .rol, an NC CAD preprocessor saves .knc, and an HPGL preprocessor saves .plt. See Preprocessors.

Units

  • The job uses the units of the project. The tool diameter uses the same units.

Related pages

See also

Clone this wiki locally