Voron Klipper Exclude Object Advanced Guide — Multi-Object Printing, Cancellation, and Recovery
Klipper Printing Advanced
Klipper's Exclude Object feature (added in v0.10.0) is one of the most powerful quality-of-life improvements for Voron printers. It allows you to cancel individual objects during a multi-object print without stopping the entire job. If one part fails — a knocked-off print, a spaghetti disaster, or a layer shift — you can cancel just that object, save the rest of the print, and avoid wasting hours of printing time. Last updated: May 2025.
This advanced guide covers everything you need to fully leverage Exclude Object on your Voron: slicer configuration for object labeling, selective cancellation via web interface or macros, print recovery after failure, multi-material considerations, parking strategies for cancelled objects, and custom macro integration for Voron-specific workflows.
How Exclude Object Works
Exclude Object relies on EXCLUDE_OBJECT G-code labels embedded in the sliced file. Klipper tracks the position of each labeled object and, when asked, skips all G-code associated with that object. The feature requires three components:
- Slicer labeling: Your slicer must emit
EXCLUDE_OBJECT_DEFINEandEXCLUDE_OBJECT_NAMEG-code commands that define each object's bounding box and name. - Klipper moonraker integration: Fluidd or Mainsail read these labels and provide a cancel button per object in the web interface.
- Print start macro support: Your START_PRINT macro must not interfere with object labels (certain G-code commands can strip or reset object definitions).
When you exclude an object, Klipper continues printing the remaining objects normally. The cancelled object's area is skipped — the toolhead will either move over it without extruding (if it encounters infill) or travel around it (for walls and perimeters). The result is a finished plate with the cancelled object either partially printed or completely missing.
Slicer Configuration
OrcaSlicer
- Go to Printer Settings → G-code Output → "Label objects" or "Enable object exclusion." Set this to ON.
- OrcaSlicer emits
EXCLUDE_OBJECT_DEFINE NAME=Object1 CENTER=X,Yfor each object on the plate. - OrcaSlicer also supports
EXCLUDE_OBJECT_DEFINE NAME=Object1 POLYGON=[[x1,y1],[x2,y2],...]if you want polygon-based (more precise) object boundaries. Enable "Use polygon for exclude object" in the advanced settings. - Recommended: Use polygon mode for complex-shaped objects where simple center-point exclusion might skip nearby non-object geometry.
SuperSlicer
- Go to Printer Settings → G-code Tags → "Keep G-code labels as-is" and enable "Label objects."
- SuperSlicer uses
EXCLUDE_OBJECT_DEFINEwith bounding box format. It also emitsEXCLUDE_OBJECT_NAME=Object1before each object's G-code block. - SuperSlicer requires the "Label objects" option to be explicitly enabled — it is off by default.
PrusaSlicer
- Go to Printer Settings → G-code Tags → "Enable object exclusion labels."
- PrusaSlicer uses the same format as SuperSlicer. Both are built on the same codebase and behave identically for exclude object.
Cura
- Cura does not natively support
EXCLUDE_OBJECT_DEFINEG-code. You can use a post-processing plugin ("Klipper Exclude Object" by scotty101 on the Cura marketplace) that inserts the labels after slicing. - Alternatively, use OrcaSlicer — it is the recommended slicer for Voron printers and has first-class Exclude Object support.
START_PRINT Macro Compatibility
A common problem is that custom START_PRINT macros clear or override object labels. If your macro runs CLEAR_PASTE, SDCARD_RESET_FILE, or re-homes the printer after the print file is loaded, it can strip the object definitions from Klipper's virtual SD card buffer.
Rules for START_PRINT compatibility:
# DO run G28 (home) before the print file is loaded
# DO run Z_TILT_ADJUST and BED_MESH_CALIBRATE before the file is loaded
# DO NOT run G28 after the print file has started
# DO NOT run CLEAR_PASTE in START_PRINT
# DO NOT use SDCARD_RESET_FILE in START_PRINT
# DO use SDCARD_PRINT_FILE at the END of START_PRINT only
# Recommended START_PRINT flow:
[gcode_macro START_PRINT]
gcode:
G28 # Home before file load
Z_TILT_ADJUST # Level gantry
BED_MESH_CALIBRATE # Create bed mesh
G1 Z5 F3000 # Move up to safe height
G1 X0 Y0 F6000 # Move to corner
M109 S{first_layer_temp} # Wait for nozzle temp
# File is loaded by the web interface AFTER START_PRINT completes
# Exclude object labels are preserved
Selective Object Cancellation via Web Interface
Both Fluidd and Mainsail display a per-object cancel button next to each labeled object in the web interface.
- Fluidd: The "Objects" tab lists all detected objects with colored markers. Click the red X next to an object to cancel it. You can also click on the 3D preview and select an object to cancel.
- Mainsail: The "Exclude Objects" panel shows each object with a Cancel button. Mainsail also shows a thumbnail preview with object outlines that you can click to cancel.
- Multiple cancellations: You can cancel multiple objects one at a time. Klipper handles the G-code skipping on the fly.
- Reversing a cancellation: You cannot "un-cancel" an object once excluded. The G-code for that object is skipped permanently in the current job.
Macro-Based Cancellation
For advanced users, Exclude Object can be controlled via G-code macros. This enables automatic failure detection, conditional cancellation, and custom parking behavior.
# Basic manual exclude via console:
EXCLUDE_OBJECT NAME=Object1
# Cancel the current object (the one being printed when command is issued):
EXCLUDE_OBJECT NAME=current
# List all objects on the plate:
EXCLUDE_OBJECT VERBOSE=1
# Custom exclude macro with parking:
[gcode_macro EXCLUDE_AND_PARK]
description: Cancel an object and park the toolhead
gcode:
{% set NAME = params.NAME|default("") %}
{% if NAME %}
EXCLUDE_OBJECT NAME={NAME}
{% else %}
EXCLUDE_OBJECT NAME=current
{% endif %}
# Park in a safe corner
G91 # Relative positioning
G1 Z5 F300 # Lift 5mm
G90 # Absolute positioning
G1 X0 Y{printer.toolhead.position.y} F6000 # Move to X=0
G1 Z{printer.toolhead.position.z + 10} F300 # Additional lift
STATUS # Show status update
Print Recovery After Failure
When a print fails mid-job (object detaches, spaghetti, layer shift), follow these steps to recover the remaining objects:
- Pause the print immediately. The longer you wait, the more mess accumulates.
- Remove the failed object carefully from the build plate without disturbing the other objects. Use tweezers or pliers for small pieces. Be careful not to knock over adjacent parts.
- Clean the area where the failed object was printing. Remove any loose filament, blobs, or strings that could collide with the toolhead.
- Cancel the failed object via the web interface or console command:
EXCLUDE_OBJECT NAME=Object2. - Resume the print. Klipper will skip the cancelled object's remaining G-code and continue with the other objects.
- Monitor the first few layers after resuming. The toolhead may need to travel over areas where the cancelled object was located — ensure there is no debris that could cause a crash.
Limitations: Recovery works best when the failure is caught early (within the first few layers of the failed object). If the failure has been running for many layers and has built up a large blob, cleanup may be impractical and cancelling the entire job may be the better option.
Multi-Material Considerations
Exclude Object with multi-material printing (MMU, ERCF, or toolchanging) introduces additional complexity:
- Filament swaps: When you exclude an object that requires a specific filament, Klipper skips not just the object geometry but also any T-code (tool change) commands associated with that object. This can confuse the filament system's state tracking.
- ERCF / Happy Hare: The Happy Hare filament management macros include their own exclusion handling. Ensure you are running the latest version (v3+), which integrates with Klipper's native EXCLUDE_OBJECT. Older versions may not track filament state correctly after an exclude operation.
- Toolchanging (Dragon Burner, TapChanger): Excluding an object on a toolchanger printer cancels only that object's geometry, but the tool remains loaded. No special handling is needed beyond what Klipper provides.
- Purge towers and prime lines: These are typically labeled as separate objects. You can exclude them from the start (they are not needed on every print) to save a few grams of filament. Exclude them after the first tool change completes.
Parking Strategies for Cancelled Objects
When an object is cancelled, the toolhead continues printing the next object. The path between objects may pass through the cancelled object's area. This can cause collisions if the cancelled object has loose filament or has detached from the bed.
- Default behavior: Klipper's EXCLUDE_OBJECT simply skips the G-code lines belonging to the cancelled object. The toolhead moves in a straight line from its current position to the next object's start point. This path may cross the cancelled object's bounding box.
- Safe Z-hop on cancel: Configure your slicer to add Z-hop on retract (0.2-0.4mm for Voron). This ensures the nozzle clears the failed object's maximum height during travel moves between objects.
- Manual parking macro: Use the EXCLUDE_AND_PARK macro shown above to lift the toolhead 5-10mm and move to a safe corner before the next object starts. This is the safest option for messy failures.
- Object order optimization: Slice with objects ordered from front to back or left to right. If a front object fails, the toolhead does not need to travel over it to reach back objects. In OrcaSlicer, set "Print sequence" to "By object" rather than "By layer" for this purpose.
Exclude Object Without a Slicer
You can manually add EXCLUDE_OBJECT labels to any G-code file. This is useful for legacy files or files from unsupported slicers:
# Add this at the start of the G-code file, before the first object: EXCLUDE_OBJECT_DEFINE NAME=Part1 CENTER=100,150 POLYGON=[[95,145],[105,145],[105,155],[95,155]] EXCLUDE_OBJECT_DEFINE NAME=Part2 CENTER=200,150 POLYGON=[[195,145],[205,145],[205,155],[195,155]] # Before each object's G-code, add the name: EXCLUDE_OBJECT NAME=Part1 ; --- Part1 G-code here --- ; (all moves for Part1) EXCLUDE_OBJECT NAME=Part2 ; --- Part2 G-code here --- ; (all moves for Part2)
Manually labeled files work identically to sliced files. Klipper does not distinguish between the two.
Voron-Specific Macros for Exclude Object
Here is a complete macro set optimized for Voron printers:
# Voron-optimized Exclude Object with safe parking
[gcode_macro VORON_EXCLUDE_CURRENT]
description: Exclude the currently printing object and park safely
gcode:
SAVE_GCODE_STATE NAME=exclude_state
EXCLUDE_OBJECT NAME=current
G91
G1 Z10 F300
G90
G1 X{printer.toolhead.axis_maximum.x - 20}
Y{printer.toolhead.axis_maximum.y - 20} F9000
RESTORE_GCODE_STATE NAME=exclude_state MOVE=0
[gcode_macro VORON_EXCLUDE_BY_NAME]
description: Exclude a specific object by name
gcode:
{% set NAME = params.NAME|default("") %}
{% if NAME %}
SAVE_GCODE_STATE NAME=exclude_state
EXCLUDE_OBJECT NAME={NAME}
G91
G1 Z10 F300
G90
G1 X{printer.toolhead.axis_maximum.x - 20}
Y{printer.toolhead.axis_maximum.y - 20} F9000
RESTORE_GCODE_STATE NAME=exclude_state MOVE=0
{% else %}
RESPOND MSG="VORON_EXCLUDE_BY_NAME: No NAME parameter provided"
{% endif %}
[gcode_macro VORON_LIST_OBJECTS]
description: List all detected objects with their status
gcode:
EXCLUDE_OBJECT VERBOSE=1
Add these macros to your printer.cfg under the [gcode_macro] section. They will appear as printable macros in Fluidd/Mainsail.
Troubleshooting Exclude Object
| Problem | Cause | Solution |
|---|---|---|
| No objects shown in UI | Slicer not labeling objects, or START_PRINT cleared labels | Enable "Label objects" in slicer. Check G-code file for EXCLUDE_OBJECT_DEFINE lines. |
| Exclude button does nothing | Klipper version too old (pre-v0.10.0), or Moonraker misconfiguration | Update Klipper to latest stable. Check Moonraker allowlist for EXCLUDE_OBJECT. |
| Toolhead collides with cancelled object | No Z-hop, cancelled object has high remaining geometry | Enable Z-hop in slicer (0.4mm). Use EXCLUDE_AND_PARK macro to move to safe area. |
| Multi-material filament mismatch after exclude | Happy Hare/ERCF state out of sync with Klipper exclude state | Update Happy Hare to v3+. Run ERCF_RESET after exclude if state is lost. |
| Exclude object causes G-code parsing error | Malformed EXCLUDE_OBJECT_DEFINE (missing comma, incorrect polygon) | Check slicer output. Manually edit G-code to fix polygon syntax. |
Limitations and Known Issues
- "By object" print sequencing (printing one entire object at a time) works best with Exclude Object. "By layer" sequencing (all objects layer by layer) means the cancelled object's layers are interleaved with other objects — skipping them is more complex and can leave gaps in the remaining objects.
- Large objects (covering 50%+ of the build plate) cannot be easily excluded because the other objects may be inside the large object's bounding box. Excluding the large object may leave no printable area for the remaining objects.
- Spaghetti detection integration: Third-party spaghetti detection systems (Spaghetti Detective, Obico) can be configured to automatically call EXCLUDE_OBJECT when a failure is detected on a specific object. This requires custom webhook configuration in Obico.
- Belt-driven extruder microstepping: Some users report that excluding an object mid-print on high-speed Vorons (200mm/s+) can cause a brief pause that results in a visible Z seam or blob at the resume point. This is a known Klipper behavior — the pause is typically 50-200ms.