Page 1 of 1

Fillet all corners of multiple polylines at once.

Posted: Thu Mar 11, 2021 8:16 pm
by rhgrafix
I found this code to fillet all corners of multiple closed polylines at the same time but it doesn't run in iCad, it just highlights the polylines and displays FMP in the text display area. I set my FILLETRAD to .05 before running it and my plines are LW.
Thanks!

Code: Select all

(defun C:FMP ; = Fillet Multiple Polylines
  (/ plss n)
  (if (setq plss (ssget "_:L" '((0 . "LWPOLYLINE"))))
    (repeat (setq n (sslength plss))
      (command "_.fillet" "_polyline" (ssname plss (setq n (1- n))))
    ); repeat
  ); if
  (princ)
); defun

Re: Fillet all corners of multiple polylines at once.

Posted: Thu Mar 11, 2021 10:56 pm
by QuanNguyen
Try this:

Code: Select all

(defun C:FMP ; = Fillet Multiple Polylines
  (/ plss n)
  (if (setq plss (ssget '((0 . "LWPOLYLINE"))))
    (repeat (setq n (sslength plss))
      (command "_.fillet" "_polyline" (ssname plss (setq n (1- n))))
    ); repeat
  ); if
  (princ)
); defun

Re: Fillet all corners of multiple polylines at once.

Posted: Thu Mar 11, 2021 11:18 pm
by rhgrafix
Yes! Perfect, thanks again Quan.
Ramon
QuanNguyen wrote:
Thu Mar 11, 2021 10:56 pm
Try this:

Code: Select all

(defun C:FMP ; = Fillet Multiple Polylines
  (/ plss n)
  (if (setq plss (ssget '((0 . "LWPOLYLINE"))))
    (repeat (setq n (sslength plss))
      (command "_.fillet" "_polyline" (ssname plss (setq n (1- n))))
    ); repeat
  ); if
  (princ)
); defun