+ Reply to Thread
Results 1 to 1 of 1
  1. #1
    Junior Member
    Using
    AutoCAD 2012
    Join Date
    Jul 2011
    Posts
    19

    Default Break Intersecting Lines with Selection Set

    Registered forum members do not see this ad.

    Code:
    (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.
    Attached Files

Similar Threads

  1. Break lines around blocks with selection
    By ibanez_222 in forum AutoLISP, Visual LISP & DCL
    Replies: 13
    Last Post: 21st Oct 2012, 01:07 am
  2. Intersecting Objects Lines/Arcs/Mlines
    By harrison-matt in forum AutoLISP, Visual LISP & DCL
    Replies: 6
    Last Post: 5th Jun 2011, 03:08 am
  3. Intersecting lines
    By Tyke in forum AutoLISP, Visual LISP & DCL
    Replies: 3
    Last Post: 6th Jan 2010, 09:49 am
  4. Intersecting lines
    By MR MAN in forum AutoLISP, Visual LISP & DCL
    Replies: 6
    Last Post: 24th Nov 2009, 02:04 am
  5. Break 2 Intersecting Lines
    By wherestheanykey in forum AutoCAD Drawing Management & Output
    Replies: 3
    Last Post: 16th Apr 2007, 11:32 pm

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts