You can always explode a Polyline if you need to break your polyline into individual segments. This method will make the polyline into individual lines. But what if you would like these individual segments to remain individual polylines? That’s where this routine comes in handy.
- BPV <enter> to start Break Polyline Vertex
- Select the polyline(s) <enter>
(defun c:BPV (/ _chop ss i e) ;; Break lwPolyline at each Vertex ;; Alan J. Thompson, 09.14.11 (vl-load-com) (defun _chop (lst e) (if (vlax-curve-isClosed e) (cdr lst) (reverse (cdr (reverse (cdr lst)))) ) ) (if (setq ss (ssget "_:L" '((0 . "LWPOLYLINE") (-4 . ">") (90 . 2)))) (repeat (setq i (sslength ss)) (foreach point (_chop (apply 'append (mapcar '(lambda (x) (if (eq (car x) 10) (list (trans (cdr x) 0 1)) ) ) (entget (setq e (ssname ss (setq i (1- i))))) ) ) e ) (vl-cmdf "_.break" e "_F" "_non" point "_non" point) (setq e (entlast)) ) ) ) (princ) )
A great perspective, but this does not work in my cad, could there be a bug?