🎉 WIN a Snapmaker U1 Printer! Enter FREE now

--export-3mf

<file.3mf>
Output Orca SlicerBambu Studio

Write the post-slice project as a BambuLab-extended 3MF ZIP archive containing embedded G-code per plate, slice statistics, thumbnails, and resolved settings; this is the standard output target for every headless CLI slice.

Details

--export-3mf <file.3mf> is the primary output flag for headless slicing. It accepts a filename as its value and writes a BambuLab-extended 3MF archive — a ZIP container — to that path. The archive is always written atomically: the slicer writes to a .tmp file beside the destination and renames it on success, so a partial write never leaves a corrupt output at the target path. Failure exits with a distinct error code rather than silently producing a truncated file.

The archive contains the sliced G-code at Metadata/plate_N.gcode (one entry per sliced plate, numbered from 1), a corresponding MD5 checksum file at Metadata/plate_N.gcode.md5, slice statistics and filament usage in Metadata/slice_info.config, plate thumbnails at Metadata/plate_N.png and Metadata/plate_N_small.png, the full resolved print settings, and the model geometry in 3D/3dmodel.model. When a single plate is targeted via --slice N, the cover thumbnail relationship in the archive points to that plate's thumbnail rather than defaulting to plate 1.

If --outputdir is also set, its value is unconditionally prepended to the filename supplied to --export-3mf using plain string concatenation — there is no special handling for absolute paths, and the join applies regardless of the form of the export filename. The companion flag --min-save activates a geometry-omitting save mode that drops the mesh from the archive while keeping the G-code, slice info, settings, and thumbnails intact — useful when downstream consumers only need the toolpaths and the model geometry is already stored elsewhere.

Examples

Export sliced project
--slice 1 --load-settings "m.json;p.json" \
  --export-3mf out.gcode.3mf model.3mf

Watch out for

  • The output is a ZIP archive, not a raw `.gcode` file. To extract bare G-code for tools that do not understand the 3MF container, unzip the output and read `Metadata/plate_1.gcode` (or the appropriate plate number).
  • If `--outputdir` is set, its value is unconditionally prepended to the filename given to `--export-3mf` via plain string concatenation. There is no bypass for absolute paths — the join always applies when `--outputdir` is non-empty.
  • `--min-save` removes mesh geometry from the output 3MF but leaves the G-code and all slice metadata intact. The resulting file is smaller but cannot be re-opened as a full project.

Related flags

Sign up for free today

No credit card required. Connect unlimited printers and get production automation running in minutes.