Saturday, November 28, 2009

How to remove arc segments from Pline?

If you want to remove all arc segments from a polyline - replace them by straight lines - use the PEDIT and its option Decurve.

To process multiple polylines, you can use the following LISP code (REMARC command):

(defun C:REMARC ( / i ssl ss e)
(setq ss (ssget "_X" '((0 . "LWPOLYLINE"))))
(setq i 0 ssl (sslength ss))
(while (< i ssl)
(setq e (ssname ss i))
(command "_PEDIT" e "_De" "")
(setq i (1+ i))
)
(princ)
)

No comments:

Post a Comment