Samr1979 Posted January 5, 2022 Posted January 5, 2022 I'm looking for a LISP that lets me break lines that intersect at a desistance I tell it to. I haven't been able to find one yet? Any help will be useful. Quote
Emmanuel Delay Posted January 6, 2022 Posted January 6, 2022 Yes, that's doable. Could you upload a dwg (/picture) of the desired result? So we know exactly what you want. Quote
dan20047 Posted January 6, 2022 Posted January 6, 2022 (edited) I don't have a lisp, but I use CAB's break lisp explained here: https://skillamplifier.com/break-selected-objects-autocad/ Then I use the lengthen command with negative distance, I have a shortcut for entering. Works well for a few lines, but because lengthen only accepts single object section, not a fence selection, it is tedious to pick lots of lines. (in Bricscad v15 at least) (defun c:LD () (command "LENGTHEN" "DELTA") (princ)) Edited January 6, 2022 by dan20047 1 Quote
mhupp Posted January 7, 2022 Posted January 7, 2022 (edited) What Dan posted is nice program but doesn't have an option for gaps so this is what I came up with. Will remeber last gap distance used. ;;----------------------------------------------------------------------------;; ;; Breakes line with a gap. (defun C:GapBreak (/ oldsnap lst val line cen cir dia a) (vl-load-com) (setq doc (vla-get-modelspace (vla-get-activedocument (vlax-get-acad-object)))) (setq lst (list 'cmdecho 'osmode) val (mapcar 'getvar lst) ) (mapcar 'setvar lst '(0 32)) (setq line (car (entsel "\nSelect Line: "))) (while (/= (cdr (assoc 0 (entget line))) "LINE") ;repeat until line is selected (setq line (car (entsel "\nSelect Line: "))) ) (setq cen (getpoint "\nBreaking Point: ")) (setq dia (vlax-ldata-get "cir" "dia")) ;checks for ldata and sets the variable (if (= dia nil) (setq dia "5")) ;first time running it will default to value 5 (if (= "" (setq a (getstring (strcat "\nGap Size [" dia "]: ")))) (setq a dia) ;if you hit enter it will set a to dia value else override it to what you input ) (vlax-ldata-put "cir" "dia" a) ;Saves value to drawing (setq cir (vla-addcircle doc cen a)) (command "_.Trim" cir "" (cons line (list cen)) "") (vla-delete cir) (mapcar 'setvar lst val) (princ) ) Edited January 8, 2022 by mhupp added vl-load-com Quote
ronjonp Posted January 7, 2022 Posted January 7, 2022 There's this oldie but goodie: http://www.theswamp.org/index.php?topic=10370.0 Quote
Samr1979 Posted January 11, 2022 Author Posted January 11, 2022 Emmanuel Delay, This is kind of what I'm talking about GAP-Layout1.pdf Quote
SLW210 Posted January 12, 2022 Posted January 12, 2022 Try this one...AutoLISP: Break at Intersections With A Gap | AutoCAD Tips (autocadtips1.com) Quote
mhupp Posted January 12, 2022 Posted January 12, 2022 16 hours ago, Samr1979 said: Emmanuel Delay, This is kind of what I'm talking about That is what mine does but one point at a time. id use SLW210's since it handles multiple points at once. Quote
ronjonp Posted January 12, 2022 Posted January 12, 2022 On 1/7/2022 at 2:07 PM, ronjonp said: There's this oldie but goodie: http://www.theswamp.org/index.php?topic=10370.0 @Samr1979 1 Quote
dan20047 Posted January 12, 2022 Posted January 12, 2022 Ronjonp - thanks! I totally missed that option in CAB's great tool. Quote
ronjonp Posted January 12, 2022 Posted January 12, 2022 3 minutes ago, dan20047 said: Ronjonp - thanks! I totally missed that option in CAB's great tool. Cheers! Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.