Gigliano70
2008-07-07, 06:06 PM
I have two different break at intersection routines and they both clear my osnaps once they have completed. can someone take a look and see what the problem is?
;Description: This lisp routine breaks at intersection
;****************************************************************************
(defun c:bi ()
(setvar "cmdecho" 0)(command "coords" "0")
(graphscr)
(setq lay (getvar "clayer"))
(setq txt (strcat "Layer " lay " - Tweaqed Concepts '96"))
(grtext -1 txt)
(grtext -2 "Another Bryen Product")
(setvar "cmdecho" 0)
(command "osnap" "nea")
(setq a (getpoint "\nEntity to break: "))
(command "osnap" "none")
(command "osnap" "int")
(setq b (getpoint "\nIntersection to break at: "))
(command "osnap" "none")
(command "break" a "f" b b)
(setvar "cmdecho" 1)
(princ)
)
(defun c:il ()
(setq a (entget (car (entsel "Select target:"))))
(setq a (cdr (assoc 8 a)))
(command "layer" "s" a "")
(command "layer" "f" "*" "")
)
;Description: This lisp routine breaks at intersection
;****************************************************************************
;USE THIS IF OSNAPS GET RESET BY BI
;WILL BREAK A LINE AT AN INTERSECTION WITH ANOTHER LINE. AUTOMATICALLY SETS
;OSNAP TO "INTERSECT". *[LL]
;
(defun C:BK (/ ln bkpt)
(setq om (getvar "osmode"))
(setvar "cmdecho" 0)
(setvar "osmode" 32)
(setq ln (entsel "\nChoose Line to Break..."))
(setq bkpt (getpoint "\nPick Break Point.. "))
(command "break" ln "f" bkpt "@")
(setvar "osmode" om)
(setvar "cmdecho" 1)
(prin1)
)
Thanks in advance all.
Moderator Note:
Please use [ CODE ] tags... (http://forums.augi.com/misc.php?do=bbcode#code)
;Description: This lisp routine breaks at intersection
;****************************************************************************
(defun c:bi ()
(setvar "cmdecho" 0)(command "coords" "0")
(graphscr)
(setq lay (getvar "clayer"))
(setq txt (strcat "Layer " lay " - Tweaqed Concepts '96"))
(grtext -1 txt)
(grtext -2 "Another Bryen Product")
(setvar "cmdecho" 0)
(command "osnap" "nea")
(setq a (getpoint "\nEntity to break: "))
(command "osnap" "none")
(command "osnap" "int")
(setq b (getpoint "\nIntersection to break at: "))
(command "osnap" "none")
(command "break" a "f" b b)
(setvar "cmdecho" 1)
(princ)
)
(defun c:il ()
(setq a (entget (car (entsel "Select target:"))))
(setq a (cdr (assoc 8 a)))
(command "layer" "s" a "")
(command "layer" "f" "*" "")
)
;Description: This lisp routine breaks at intersection
;****************************************************************************
;USE THIS IF OSNAPS GET RESET BY BI
;WILL BREAK A LINE AT AN INTERSECTION WITH ANOTHER LINE. AUTOMATICALLY SETS
;OSNAP TO "INTERSECT". *[LL]
;
(defun C:BK (/ ln bkpt)
(setq om (getvar "osmode"))
(setvar "cmdecho" 0)
(setvar "osmode" 32)
(setq ln (entsel "\nChoose Line to Break..."))
(setq bkpt (getpoint "\nPick Break Point.. "))
(command "break" ln "f" bkpt "@")
(setvar "osmode" om)
(setvar "cmdecho" 1)
(prin1)
)
Thanks in advance all.
Moderator Note:
Please use [ CODE ] tags... (http://forums.augi.com/misc.php?do=bbcode#code)