TheSwamp
Code Red => AutoLISP (Vanilla / Visual) => Topic started by: TJAM51 on February 06, 2008, 08:05:22 AM
-
I am seeking a break line routine where you can set the distance and then pick the intersection of the two lines...but I need to somehow be able to indicate breaking the horizontal or vertical line...thanks
-
I have that, just a minute
-
(DEFUN C:Bkwr (/ PT PT1 PT2 PT3 A1)
(PROMPT "\n \nBreak @ Intersection")
(INITGET 1)
(SETVAR "OSMODE" 32)
(COMMAND "SNAP" "OFF")
(setq dsc (getvar "dimscale"))
(SETQ PT1 (GETPOINT "\n\n Pick intersection to be broken: "))
(SETVAR "OSMODE" 0)
(INITGET 33)
(SETVAR "OSMODE" 512)
(SETQ PT (GETPOINT PT1 "\n Pick Line to be broken: "))
(IF (= BRKW NIL)
(SETQ BRKW 0.0625) ;set wire gap here. Gap is double the value set
)
(SETQ A1 (ANGLE PT1 PT)
PT2 (POLAR PT1 A1 (* dsc BRKW))
PT3 (POLAR PT1 (+ A1 PI) (* dsc BRKW))
)
(COMMAND ".BREAK" PT "F" PT2 PT3)
)
just edit as needed
-
THANKS MUCH :-D :lmao:
-
I had downloaded the Breakall.lsp from a site and was wondering how to code that for a set gap. I like the breakall as I can choose all the lines on my drawing. Just wish I could set a gap.
-
There are a few in here -> http://www.theswamp.org/index.php?topic=20748.0
Perhaps you've seen it before. :)
-
Yes, I've seen all those. None of them do what I want. I'm not that smart when it comes to scripting these lisp files. I'm sure there's an easy way to add gap to them but I have no idea what I'm doing.
-
The one I posted, HVBA, asks you for the gap distance, then whether you want the breaks to be vertical or horizontal and then all you do is drag the cursor over the intersections and it breaks them all automagically.
-
That's just it though. I want to do an entire drawing, so therefore I will have horizontal and vertical breaks. If I have to pick the intersections individually, then there's really no time savings between your command and the original AutoCad break.
-
If I have to pick the intersections individually...
You don't have to... you just drag the cursor around the drawing. It just has to pass by each intersection within the gap distance you specified.