G-code Export
Exporting G-code is the final step — it translates your toolpaths into machine-readable instructions.
How to Export
- File > Export G-code or use the toolbar export button
- Choose a file location and name (
.ncextension) - The G-code is written using the dialect configured in your machine settings
What the G-code Contains
The exported file includes:
- Header — initialization commands, units (G21 for mm), coordinate mode
- Spindle start —
M3 S{rpm}to start the spindle - Toolpaths —
G0(rapid) andG1(linear) /G2/G3(arc) moves - Safe Z retracts —
G0 Z{safe}between operations - Spindle stop —
M5at the end - Footer — return to safe position, program end (
M30for GRBL,M2for LinuxCNC)
Pre-Export Checklist
Before exporting, verify:
- All operations have valid toolpaths (no errors in the tree)
- Toolpath validation passes (no overcuts)
- Stock dimensions match your actual material
- Tool assignments are correct
- Feed rates and speeds are appropriate for your material
G-code Dialects
The export format is determined by your machine's G-code dialect. See G-code Dialects for details on supported dialects and their differences.