|

How to Instantly Fillet with Radius 0 in AutoCAD: The Robust “FZ” AutoLISP Script

Program Description

The FilletZero.lsp routine is a lightweight but highly effective productivity tool for users of AutoCAD. The native AutoCAD FILLET command forces you to constantly switch radii when moving between rounded and sharp corners. That slows you down over a full production day.

The FZ command removes that friction. It forces a radius of 0.0, lets you clean intersections immediately (including polylines), and then automatically restores your previous fillet radius when you’re done.

This is not a quick macro. It includes robust error handling, meaning:

  • Your system variables are restored even after ESC
  • The command runs silent (CMDECHO = 0)
  • No side effects remain in your session

This is the type of routine you keep loaded permanently.


Download the script here.


Step-by-Step Guide

Load the Script

Drag and drop the FilletZero.lsp file into AutoCAD, or run APPLOAD and select the file.

Reference:

To avoid loading the script every session:

Pro Tip: Add the LISP file to the Startup Suite

  • Run APPLOAD
  • Click the Contents (briefcase icon)
  • Add FilletZero.lsp

From that point, FZ is available in every drawing automatically.


Launch the Command

Type FZ and press Enter.

No setup required. The routine handles everything internally.


Select Objects

Click the two objects you want to clean:

  • Lines
  • Arcs
  • Polylines

Because the routine uses the native FILLET engine, all built-in options remain available.

Important (Polyline workflow): After launching FZ, type P then press Enter to fillet an entire polyline at once.


Automatic Reset

Once finished, the routine:

  • Restores your original fillet radius
  • Displays a confirmation message
  • Leaves your environment unchanged

FilletZero.lsp (Final Production Version)

;;; FilletZero.lsp
;;; Command: FZ
;;; Description: Instantly fillets objects with radius 0, 
;;;              includes robust error handling and restores settings.

(defun c:FZ ( / *error* oldrad oldecho )

  ;; --- Local Error Handler ---
  (defun *error* (msg)
    ;; Restore system variables if they were successfully stored
    (if oldrad (setvar "FILLETRAD" oldrad))
    (if oldecho (setvar "CMDECHO" oldecho))

    ;; Inform the user only if the error wasn't a manual cancellation
    (if (and msg (not (wcmatch (strcase msg) "*CANCEL*,*QUIT*,*EXIT*")))
      (princ (strcat "\nError: " msg))
    )
    (princ)
  )

  ;; --- Save and Configure ---
  (setq oldrad  (getvar "FILLETRAD")
        oldecho (getvar "CMDECHO"))

  (setvar "CMDECHO" 0)
  (setvar "FILLETRAD" 0.0)

  ;; --- Execution ---
  (princ "\nFillet Radius forced to 0.0. Select objects or [Polyligne]: ")
  (command "_.FILLET")

  ;; The while loop handles native options like "Polyligne" or "Multiple"
  (while (> (getvar "CMDACTIVE") 0)
    (command pause)
  )

  ;; --- Clean Exit ---
  ;; Manually trigger the restoration part of the error handler
  (*error* nil) 
  (princ (strcat "\nRadius restored to: " (rtos (getvar "FILLETRAD"))))
  (princ)
)

;; Load Message
(princ "\nFilletZero (FZ) loaded. Radius set to 0.")
(princ)

Under the Hood: What the Script Does

System Variable Control

The routine temporarily overrides:

  • FILLETRAD → set to 0.0
  • CMDECHO → set to 0

Then restores both safely, regardless of how the command exits.

Reference:

  • AutoCAD FILLETRAD system variable
  • AutoCAD CMDECHO system variable

Error Handling Strategy

A localized *error* handler ensures:

  • Clean exit on ESC
  • No corrupted settings
  • Only real errors are displayed

This is standard practice for production AutoLISP, not optional.


Native Command Integration

The routine runs the actual FILLET command and monitors it using CMDACTIVE.

Result:

  • Full compatibility with Multiple mode
  • Full compatibility with Trim options
  • No behavior change from native AutoCAD

Why Every CAD Drafter Needs an “FZ” Shortcut

Corner cleanup is constant in CAD work:

  • Architectural plans
  • Mechanical parts
  • Layout corrections

Using a dedicated Fillet Radius 0 shortcut delivers immediate gains:

  • Fewer clicks per operation
  • No manual radius switching
  • Reduced command repetition
  • Lower mental fatigue during repetitive work

This version is designed for real production:

  • Silent execution
  • Safe cancellation
  • Full compatibility with native options
  • No impact on global drafting settings

You stop managing the tool and focus on geometry.


Where It Makes a Difference

Architectural Drafting

  • Wall intersections
  • Room boundaries
  • Grid cleanup

Mechanical Design

  • Edge trimming
  • Profile cleanup
  • Sketch preparation

General CAD Work

Anywhere you need sharp intersections without rounding artifacts


Installation Best Practice (Team Use)

For office deployment:

  • Add the LISP to a shared network folder
  • Load it via Startup Suite
  • Optionally include it in a company CAD standard package

Reference:


FAQ

What happens if I press Esc during the command?

The routine exits cleanly and restores all variables automatically.


How do I fillet an entire polyline?

After launching FZ, type P and press Enter, then select the polyline.


Will this change my default fillet radius?

No. Your original FILLETRAD value is restored immediately after execution.


Is this faster than using FILLET manually?

Yes. You remove:

  • Radius adjustments
  • Extra command inputs
  • Repetitive setup steps

Over a full day, the gain is noticeable.


Does this work in AutoCAD LT?

Yes. Recent versions of AutoCAD LT support AutoLISP, so the routine can run there as well.


Is it safe for production drawings?

Yes. The routine includes:

  • Error handling
  • Variable protection
  • Native command usage

It behaves like a built-in tool.


Can I customize the script?

Yes. It’s standard AutoLISP. You can integrate it into your own toolsets or extend it.


Final Note

This is a small tool, but it removes friction from one of the most repeated drafting operations.

What other AutoCAD tasks still take you too many clicks?