How are you guys drawing a Breakline?
Breakline is a command in the Express Tools of Autocad. I searched the forum here and all I see is an old reference to Express Tools for Bricscad. Is the Bricscad Express Tools something that works with the x64 version of BC 13 or do one of you have a lisp routing or something?
TIA!
Jeff
0
Comments
-
The Express Tools in the App Store has not been updated in the store so far as I can tell, but the author has versions for V13 posted at http://www.cadwiesel.de/
What I use is the following. I do not remember where I found the original code or know who the author was.
[code](defun c:breakl (/ ds pt1 pt2 ang bpt dist mpt mkpt mkang p1 p2 p3 p4 laycol olay old_osmode olecho $error
)
(defun $error (msg)
(if (or (= msg "Function cancelled") (/= msg "quit / exit abort"))
(princ (strcat "Error: " msg))
)
(setvar "osmode" old_osmode)
(setvar "cmdecho" olecho)
(setq *error* old_err)
(princ)
)
(setq olecho (getvar "cmdecho")
old_osmode (getvar "osmode")
)
(setvar "cmdecho" 0)
(setq old_err *error*
*error* $error
)
(prompt "\n BREAKL")
(setq old_osmode (getvar "osmode"))
(defun $mark (mkpt ang / mktmpt tmp)
(setq p1 (polar mkpt (+ ang pi) (* ds 0.05))
p2 (polar p1 (- ang 1.3258) (* ds 0.10307764))
p4 (setq mktmpt (polar mkpt ang (* ds 0.05)))
p3 (polar mktmpt (- (- ang pi) 1.3258) (* ds 0.10307764))
)
(if (> (distance pt1 p1) (distance pt1 p4))
(setq p1 tmp
p1 p4
p4 tmp
)
)
)
(initget 1)
(setq ds (getvar "dimscale")
pt1 (getpoint "\nPick beginning point of break: ")
)
(initget 1)
(setq pt2 (getpoint pt1 "\nPick other end point: ")
ang (angle pt1 pt2)
pt1 (polar pt1 (+ ang pi) (* ds 0.1))
pt2 (polar pt2 ang (* ds 0.1))
)
(setvar "osmode" 0)
(setvar "osmode" OLD_OSMODE)
(setq mpt (polar pt1 ang (/ (distance pt1 pt2) 2.0)))
(setvar "osmode" 0)
(command ".pline" pt1 "w" "0" "0")
($mark mpt ang)
(command p1 p2 p3 p4 pt2 "")
(command ".redraw")
(setvar "osmode" old_osmode)
(setvar "cmdecho" olecho)
(setq *error* old_err)
(princ)
)[/code]0 -
This is mine. I don't know if it's any better or even as good, it might be easier to modify if needed.
[code](Defun C:brkln (/ a p1 p2 pa pb pd ang1 ang2)
(setq os (getvar "osmode"))
(setvar "osmode" 0)
(setq a (/ (getvar "dimscale") 5)
p1 (osnap (cadr (entsel)) "end")
p2 (osnap (cadr (entsel)) "end")
p1 (polar p1 (angle p2 p1)(/ a 2))
p2 (polar p2 (angle p1 p2)(/ a 2))
pa (polar p1 (angle p1 p2)(/ (distance p1 p2) 2))
pa (polar pa (angle p2 p1)(* a 0.35))
ang1 (+ (angle p1 p2) (* 80 (/ pi 180)))
ang2 (- (angle p1 p2) (* 80 (/ pi 180)))
pb (polar pa ang1 a)
pc (polar pb ang2 (* 2 a))
pd (polar pc ang1 a))
(command "line" p1 pa pb pc pd p2 "")
(setvar "osmode" os)
)
[/code]0 -
I use a lisp routine I downloaded from Cadalyst.com from their "Get the Code' section. It was in their April '04 selection and is called LSB.lsp. Very useful - it has 2 types of breaklines, a break for solid round rods and hollow tubes. It also has slides to select the type of break and to specify how many breaks you want in your breakline. I highly recommend it.0
-
I found the link for LSB.lsp: http://cadtips.cadalyst.com/node/tiplisting?keywords=LSB0
-
Perfect! Thanks guys!!0
This discussion has been closed.