well, ive played with the break line routine CAB gave me a couple days ago. so far i added a part to put the break on a spacific layer and then set it back. i also added a part where the break line is 2 units longer than the pick points. the '2' units was just to get it working. what i would like to do is have the unit number be determind by the dimscale. what ive been trying is to go 1/8" longer than the pick points but i cant seem to get it to work. i have an error somewhere but i cant find it. any help would be appreciated. im not really familiar with this. i just kind of jumped into it. and thanks go to CAB for the routine.
any sugestions at all would be appreciated.
[color=green];;;===========================================
;;; Single Line Break Symbol Creator
;;;===========================================
;;;
;| Created by C. Alan Butler 2003
Edited by J. Oakes 2004 (recieved by CAB on TheSwamp.org)
|;
;
(defun c:brkw (/ ang cla dist dscale oldcmd p1a p1 p2 p2 p3 p4 p5 p6a p6 plwidth size usercmd useros)
;
;;;<<<<<Error Function & Routine Exit>>>>>
;;;=======================================
(defun *error* (msg)
(if
(not
(member
msg
'("console break" "Function cancelled" "quit / exit abort" "")
)
)
(princ (strcat "\nError: " msg))
) ; if
(setvar "CMDECHO" usercmd)
(setvar "osmode" useros)
(princ)
) ;
;end error function
;
;
;;;<<<<<Set value of Symbols>>>>>
;;;==============================
(setq cla (getvar "clayer"))
(setq oldcmd (getvar "CMDECHO"))
(setq plwidth (getvar "plinewid"))
(setq useros (getvar "osmode"))
(setq usercmd (getvar "CMDECHO"))
(setq dscale (getvar "dimscale"))
;
;
;;;<<<<<Set Variables
(setvar "CMDECHO" 0)
(setvar "plinewid" 0)
(if (and (setq p1a (getpoint "Starting point of line : "))
(setq p6a (getpoint p1a "\nSelect second point: "))
)
(progn
(setq dist (distance p1a p6a)
ang (angle p1a p6a)
size (* dscale .125)
p1 (polar p1a ang -size)
p2 (polar p1a ang (* 0.4167 dist))
p5 (polar p1a ang (* 0.5833 dist))
p3 (polar p2 (+ 1.25664 ang) (* 0.1667 dist))
p4 (polar p5 (+ 4.39824 ang) (* 0.1667 dist))
p6 (polar p6a ang size)
) ;_ end of setq
(setvar "osmode" 0)
(command "-layer" "thaw" "S-STAIR" "on" "S-STAIR" "make" "S-STAIR" "color"
"YELLOW" "S-STAIR" "lt" "continuous" "S-STAIR" "")
(command "pline" p1 p2 p3 p4 p5 p6 "") ; Draw the Z-Line
)
)
;
;
;;;<<<<<Set Variables back to previous>>>>>
;;;========================================
(setvar "clayer" cla)
(setvar "plinewid" plwidth)
(*error* "")
(princ)
)
(princ)
[/color]