Currently using the below LISP to break lines. The selection of lines is picking 1 line at a time. As some polylines are overlapped, i may need to repeat the command 2 or 3 times.
If someone could advise on how to include a code to select the lines through a cross window selection that would be great time saver
(defun c:BB ( / oldos ent1 p1) (setq oldos (getvar "osmode")) (while (setq ent1 (entsel "\nSelect object to break... ")) (initget 1) (setq p1 (getpoint "\nPoint at which to break... ")) (setvar "osmode" 0) (command "_.BREAK" ent1 "_f" p1 "@" "") (setvar "osmode" oldos)) (princ "\nBreak at Done") (princ))
To clarify further I also tried Charles Alan Butler LISP, but there were some issues:-
1) I can select line to be break but my breaking object is an xref, therefore it cannot be selected.
2) i bind the xref into the drawing so now can be selected but the lines to break & breaking object criss cross each other & break point is only at selected points of the lines.
3) Since it is only at selected points, i also try to instead draw a line connecting each desired break point. So then this line can be now a breaking object.
But now it take me twice as long to break this lines since i have to draw additional lines for very break point (i time myself)
So would appreciate if someone can help me to amend the LISP to allow cross window selection.
If you mean to run ncopy & select the desired lines from the xref as breaking objects before running the Charles Alan Butler LISP command, it does not work.
That would not help as the breaking object criss cross with the lines that need to break.
And to clarify further, if you mean to use the posted break LISP after ncopy, that is unnecessary steps since I can select "point" to break on the xref object.
So The main issue is the first posted BREAK lisp cannot select multiple lines that I want to break.
And although Charles Alan Butler LISP can select multiple lines that I want to break, it does not work on "points" as a break but instead on whole lines as a break
(defun c:BB ( / *error* el ss p i ent ) (vl-load-com) (defun *error* ( msg ) (vla-endundomark (vla-get-activedocument (vlax-get-acad-object))) (if msg (prompt msg)) (princ) ) (vla-startundomark (vla-get-activedocument (vlax-get-acad-object))) (setq el (entlast)) (if (null el) (progn (alert "DWG has no entities... Add some curve entities and restart routine...") (exit) ) ) (prompt "\nSelect curve entities you want to apply break at point to...") (setq ss (ssget "_:L")) (while (not ss) (if (and ss (not (vl-every '(lambda ( x ) (eq x t)) (mapcar '(lambda ( x ) (not (vl-catch-all-error-p (vl-catch-all-apply 'vlax-curve-getstartparam (list x))))) (vl-remove-if 'listp (mapcar 'cadr (ssnamex ss))))))) (progn (prompt "\nSome of selected entities doesn't belong to curves... Try selecting exlusively curve entities again...") (setq ss (ssget "_:L")) ) (if (not ss) (progn (prompt "\nEmpty sel.set... Try selecting curve entities again...") (setq ss (ssget "_:L")) ) ) ) ) (setq p t) (while p (setq p (getpoint "\nPick or specify point at which you want to break multiple curve entities - ENTER to finish : ")) (if p (repeat (setq i (sslength ss)) (setq ent (ssname ss (setq i (1- i)))) (if (vlax-curve-getparamatpoint ent p) (command "_.BREAK" ent "_non" p "_non" p)) (if (not (eq el (entlast))) (ssadd (entlast) ss)) ) ) ) (*error* nil))