i am trying to use this lisp to break and hide lines. when we do reflected details we hide part of our mounting bracket under a fascia. the bracket is a block and the fascia varies in size. it has two main problems. first it doesn't work on blocks and second when i hide the line which is the leg of the angle it goes to the corner insted of remaining straight. this block will be a dynamic block project in the future but until then i need an affective break and hide lisp. can anybody help me out please. here what i have:
;;CADALYST 01/04 Tip1919: BKH.LSP Break and Hide (c) 2004 J.D. Henman
;;; 20031002 JDH BKH.LSP
;;; For breakout of arcs & lines and inserting hidden replacement
;;; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
(defun c:HDN (/ oclayer)
(setq oclayer (getvar "clayer"))
(command "layer" "m" "HIDDEN" "c" "9" "" "lt" "hidden" "" "")
(setvar "clayer" oclayer)
) ;defun
(defun c:BKH (/ oclayer olsnap bobj bobj2 bobytyp pt1 pt2 pt3 bobjcen rdist)
;;
(C:hdn)
;;
(setq oclayer (getvar "clayer"))
(setq olsnap (getvar "osmode"))
(setvar "osmode" 127)
(setq bobj (entsel "\n Select Line, Polyline, Circle or Arc to Break: "))
(setq bobj2 (assoc 0 (entget (car bobj))))
(setq bobjtyp (cdr bobj2))
(if ( or (= bobjtyp "LINE")(= bobjtyp "LWPOLYLINE") (= bobjtyp "POLYLINE"))
(progn
(setvar "osmode" 127)
(setq pt2 (getpoint "\nSelect First Intersection. "))
(setq pt3 (getpoint "\nSelect Second Intersection. "))
(command "break" bobj "_f" pt2 pt3)
(setvar "clayer" "HIDDEN")
(setvar "osmode" 127)
(command "line" pt2 pt3 "")
(setvar "osmode" olsnap)
(setvar "clayer" oclayer)
) ;progn
(if (or (= bobjtyp "CIRCLE") (= bobjtyp "ARC"))
(progn
(princ "\nsee here")
(setvar "osmode" 127)
(setq pt2 (getpoint "\nSelect First Intersection. "))
(setq pt3 (getpoint "\nSelect Second Intersection. "))
(setq bobjcen (assoc 10 (entget (car bobj))))
(setq pt1 (cdr bobjcen))
(setq rdist (distance pt1 pt2))
(command "break" bobj "_f" pt2 pt3)
(setvar "clayer" "HIDDEN")
;(setvar "osmode" 127)
(setvar "osmode" olsnap)
(command "arc" "C" pt1 pt2 pt3)
(setvar "osmode" olsnap)
(setvar "clayer" oclayer)
) ;progn
(princ "\n Arc, Circle, Polyline or Line not selected")
) ;if
) ;if
(princ)
) ;defun