Required LSP FOR BREAK AT POINT

Required LSP FOR BREAK AT POINT

sdhara.hit
Advocate Advocate
237 Views
3 Replies
Message 1 of 4

Required LSP FOR BREAK AT POINT

sdhara.hit
Advocate
Advocate

as you can see both brek option dont have separate command to use break at a point.  so provide a lsp command to use breat at point option.  

sdharahit_0-1753428946214.png

 

0 Likes
Accepted solutions (1)
238 Views
3 Replies
Replies (3)
Message 2 of 4

-didier-
Advisor
Advisor
Accepted solution

Bonjour @sdhara.hit 

 

Here is my proposition, simple but efficient

Pay attention to the object snap when you indicate the cut-off point.

(defun c:b1 ( / ent pt1 pt2)
  (setq ent (entsel "\nENTITE ?"))
  (redraw (car ent) 3)
  (setq pt1 (cadr ent))
  (setq pt2 (getpoint "\nBreak Point ?"))
  (command "_break" pt1 "_f" pt2 pt2)
)

Amicalement

 

Éternel débutant.. my site for learning : Programmer dans AutoCAD

DA

EESignature

0 Likes
Message 3 of 4

pendean
Community Legend
Community Legend

@sdhara.hit wrote:

...so provide a lsp command to use breat at point option.  


Are you just looking for this command that's been around for a few versions now (or are you running a very old version of AutoCAD?)

pendean_0-1753449694688.png

 

pendean_1-1753449771041.png

 

Which you can abbreviate to say B1 for example (no LISP needed)

pendean_2-1753449875040.png

 

 

 

0 Likes
Message 4 of 4

Kent1Cooper
Consultant
Consultant

If your intent is to select the object and then select the point at which to Break it, that's what the right icon in the box in the image in Message 1 does.  I also have used this little simpler command definition:

(defun C:BF1 (); = Break with First option at 1 point
  (command "_.break" pause "_first" pause "@")
)

 which predates the BREAKATPOINT command.

Or is your intent to have something Broken at the point where you select it, as a one-pick-only usage?  [I wouldn't have much use for such a thing, because often the point where I want to Break something is at an intersection with something else, so the pick can be ambiguous.  But if you have such a need, that could be written into a command definition.]

Kent Cooper, AIA
0 Likes