(command "_.trim" (polar inspt 0 1.25) "" inspt inspt "") (setq inspt (cdr (assoc 10 (entget (entlast))))) Without analyzing it too deeply, it looks as though, under several of your scenarios, the Block would be the *only thing* at some of those pick locations in the Break commands, which should explain your problem.īut if the Line(s) would *always* go to or through the center of the Circle in the Block, since it appears that's how the Block is being inserted, then you might try something like this, to Trim the Line(s) to the Circle part of the Block, rather than Break them : (setq Pt4 (polar Ptp (+ 0 pi) vbrklength)) (setq Pt2 (polar Ptp (+ 1.5708 pi) hbrklength)) (command ".insert" "TERMINAL" "S" "1" pause "0") What i mean is onlt break/trim if the breaking point of a line exist.
#AUTOCAD LISP DRAW LINE UNTIL EXIT HOW TO#
Its not very clean on exitĪnyone be able to give a hand how to code it better to insert the block and only break/trim the lines as require. Press F1 for help.Īs you can see from above command echos. Hence im allow these 2 command lines to break all possible pointsīecause if some breaking point are not found, autocad command lines echo the following:. Insert the block at X-junction of 2 lines Insert the block at L-junction of 2 lines Insert the block at T-junction of 2 lines Insert the block at the other end of line (line end point) Insert the block at the end of line (line start point) Insert the block but no lines for breakage Please note the following possible scenario when insert the block (basepoint of the block is at centre) The problems is i allow for the worth case which inserted the block onto a intersection of a cross lines. The lisp works what i want, but its not clean on exit. I got this simple lisp routine which insert the block (see attached TERMINAL.dwg") and break the line(s) if line found.