Message 1 of 5
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I wrote this break lisp to simply select a point and break object. The goal was to select a point on any object/objects and the lisp will break each object at that point. It gives me At least one break point must be on polyline.*Invalid* error in one particular case. See attachment. The break occurs fine when 2 lines/plines are intersecting. But when one pline is just touching the other pline vertex, it pops the error message. I tried using vlide to figure out whats going on, but it doesnt tell me much. Any help? Thanks in advance.
(defun c:br (/ a b ctr curcmdecho curosmode curnomutt) (defun *error* (errmsg) (if (not (wcmatch errmsg "Function cancelled,quit / exit abort,console break,end" ) ) (princ (strcat "\nError: " errmsg)) ) (setvar 'cmdecho curcmdecho) (setvar 'nomutt curnomutt) (setvar 'osmode curosmode) (vla-endundomark adoc) (princ) ) (vla-startundomark (setq adoc (vla-get-activedocument (vlax-get-acad-object))) ) (setq curosmode (getvar 'osmode)) (setvar 'osmode 553) (setq curnomutt (getvar 'nomutt) curcmdecho (getvar 'cmdecho) a (getpoint "\nSelect Break Point: ") b (ssget "_c" a a) ctr 0 ) (setvar 'cmdecho 0) (setvar 'nomutt 1) (repeat (sslength b) (command-s "._break" (ssname b ctr) a a) (setq ctr (1+ ctr)) ) (setvar 'osmode curosmode) (setvar 'nomutt curnomutt) (setvar 'cmdecho curcmdecho) (vla-endundomark adoc) (*error* "end") )
Solved! Go to Solution.