Jump to content

Break Intersecting Lines with Selection Set


ibanez_222

Recommended Posts

(defun c:BIL (/ *error* pt1 ent ang b1 b2 useros usercmd)
(vl-load-com)
(defun *error* (msg)
(if (not
(member msg '("console break" "Function cancelled" "quit / exit abort" "" nil)))
(princ (strcat "\nError: " msg))
) ; if
(and usercmd (setvar "CMDECHO" usercmd))
(and useros (setvar "osmode" useros))
(princ)
) ; end error function
(setq useros (getvar "osmode"))
(setq usercmd (getvar "CMDECHO"))
(and
(setq ent (car (entsel "\n Select line to break ")))
(setvar "osmode" 32)
(setq pt1 (getpoint "\n Select Intersection of Lines "))
(setq ang (angle '(0 0)
(vlax-curve-getFirstDeriv ent
(vlax-curve-getParamAtPoint ent pt1)))
)
(setq b1 (polar pt1 ang 0.0625))
(setq b2 (polar pt1 (+ ang pi) 0.0625))
(setvar "osmode" 0)
(command "_.break" ent b1 b2 "")
)
(*error* "")
(princ)
){code} 

 

Is there a way to add a selection set to this lsp.? It works great but it would be a lot faster if I could do a selection set. I also want to still be able to modify the distances need be, because this one is set to 1/16" now but I might need to change that with other applications. If someone could help that would be great, Thanks.

BIL.LSP

Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...