Author Topic: Break line routine-set distance  (Read 2987 times)

0 Members and 1 Guest are viewing this topic.

TJAM51

  • Guest
Break line routine-set distance
« 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

David Hall

  • Automatic Duh Generator
  • King Gator
  • Posts: 4075
Re: Break line routine-set distance
« Reply #1 on: February 06, 2008, 11:05:34 AM »
I have that, just a minute
Everyone has a photographic memory, Some just don't have film.
They say money can't buy happiness, but it can buy Bacon and that's a close second.
Sometimes the question is more important than the answer. (Thanks Kerry for reminding me)

David Hall

  • Automatic Duh Generator
  • King Gator
  • Posts: 4075
Re: Break line routine-set distance
« Reply #2 on: February 06, 2008, 11:06:11 AM »
Code: [Select]
(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
Everyone has a photographic memory, Some just don't have film.
They say money can't buy happiness, but it can buy Bacon and that's a close second.
Sometimes the question is more important than the answer. (Thanks Kerry for reminding me)

TJAM51

  • Guest
Re: Break line routine-set distance
« Reply #3 on: February 06, 2008, 11:30:09 AM »
THANKS MUCH :-D :lmao:

jkruse

  • Guest
Re: Break line routine-set distance
« Reply #4 on: March 26, 2008, 03:55:10 PM »
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.

M-dub

  • Guest
Re: Break line routine-set distance
« Reply #5 on: March 26, 2008, 04:15:56 PM »
There are a few in here -> http://www.theswamp.org/index.php?topic=20748.0
Perhaps you've seen it before.  :)

jkruse

  • Guest
Re: Break line routine-set distance
« Reply #6 on: March 26, 2008, 04:25:40 PM »
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.

M-dub

  • Guest
Re: Break line routine-set distance
« Reply #7 on: March 26, 2008, 04:33:36 PM »
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.

jkruse

  • Guest
Re: Break line routine-set distance
« Reply #8 on: March 26, 2008, 04:41:00 PM »
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. 

M-dub

  • Guest
Re: Break line routine-set distance
« Reply #9 on: March 26, 2008, 04:49:09 PM »
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.