I use F for fillet with no radius, and FR for with radius
;;; replace error routines with your own, or if you have express tools XYZ-ERROR-INIT > ACET-ERROR-INIT
;;; fillet with zero radius (default mode) & trim on
(defun c:F ()
(XYZ-ERROR-INIT (list (list "cmdecho" 0 "filletrad" 0 "trimmode" 1) T)) ;do list of variables to be set/reset
(princ "\nFILLET with zero radius - use FR to use radius")
(princ "\n<Select first object>: ")
(command "FILLET")
(setvar "cmdecho" 1)
(XYZ_CMDACTIVE nil) ;finish filleting
(XYZ-ERROR-RESTORE)
(princ)
)
;;; fillet with zero radius (default mode) & trim OFF
(defun c:FN ()
(XYZ-ERROR-INIT (list (list "cmdecho" 0 "filletrad" 0 "trimmode" 0) T)) ;do list of variables to be set/reset
(princ "\nFILLET with zero radius - use FR to use radius")
(princ "\n<Select first object>: ")
(command "FILLET")
(setvar "cmdecho" 1)
(XYZ_CMDACTIVE nil) ;finish filleting
(XYZ-ERROR-RESTORE)
(princ)
)
(defun c:FR1 () ;quick fillet with already set radius
(princ (strcat "\nFILLET with radius <" (rtos (getvar "filletrad")) ">: "))
(command "fillet")
(princ)
)
(defun c:FRP1 () ;quick fillet with already set radius
(princ (strcat "\nFILLET polyline with radius <" (rtos (getvar "filletrad")) ">: "))
(command "fillet" "polyline")
(princ)
)
;;; fillet with radius
(defun c:FR ()
(XYZ-ERROR-INIT (list (list "cmdecho" 0) T)) ;do list of variables to be set/reset
(princ (strcat "\nFILLET with radius - Enter radius <" (rtos (getvar "filletrad")) ">: "))
(command "fillet" "radius")(XYZ_CMDACTIVE nil)
(princ "\nPolyline/Radius/Trim/<Select first object>: ")
(command "fillet")
(setvar "cmdecho" 1)
(XYZ_CMDACTIVE nil) ;finish filleting
(XYZ-ERROR-RESTORE)
(princ)
)
;;; fillet with radius - no trim
(defun c:FRN ()
(XYZ-ERROR-INIT (list (list "cmdecho" 0 "trimmode" 0) T)) ;do list of variables to be set/reset
(princ (strcat "\nFILLET with radius - Enter radius <" (rtos (getvar "filletrad")) ">: "))
(command "fillet" "radius")(XYZ_CMDACTIVE nil)
(princ "\nPolyline/Radius/Trim/<Select first object>: ")
(command "fillet")
(setvar "cmdecho" 1)
(XYZ_CMDACTIVE nil) ;finish filleting
(XYZ-ERROR-RESTORE)
(princ)
)
;;; fillet with radius in centimeters
(defun c:FRCM ( / fr1 fr2)
(XYZ-ERROR-INIT (list (list "cmdecho" 0) T)) ;do list of variables to be set/reset
(setq fr1 (XYZ_GETREAL "\nFILLET radius in centimeters? " (if XYZ_FilletRadiusCM (cvunit XYZ_FilletRadiusCM "inch" "cm"))))
(setq fr2 (cvunit fr1 "cm" "inch"))
(command "fillet" "radius" fr2)(XYZ_CMDACTIVE nil)
(princ "\nPolyline/Radius/Trim/<Select first object>: ")
(command "fillet")
(setvar "cmdecho" 1)
(XYZ_CMDACTIVE nil) ;finish filleting
(XYZ-ERROR-RESTORE)
(setq XYZ_FilletRadiusCM fr2)
(princ)
)
;;; fillet multiple plines
(defun C:fpm (/ ss n cir )
(XYZ-ERROR-INIT (list (list "cmdecho" 0) T)) ;do list of variables to be set/reset
(while (not (setq ss (ssget '((0 . "*POLYLINE*"))))))
(setq n (1- (sslength ss)))
(while (>= n 0)
(setq cir (ssname ss n)
n (1- n)
);;setq
(command "fillet" "p" cir)
(princ)
);;while
(princ
(strcat
(itoa (sslength ss))
" POLYLINEs filleted."
);;strcat
);;alert
(XYZ-ERROR-RESTORE)
)
;==========================================================
; Continue pausing until exited command mode
; nil = pause
; otherwise pass string to use
;==========================================================
(defun XYZ_CMDACTIVE ( passcmd / )
(if (null passcmd) (setq passcmd pause))
(while (not (= 0 (getvar "cmdactive")))
(command passcmd)
) ;end while
)