Glen Smith Posted September 8, 2010 Posted September 8, 2010 I have tweaked the code posted above so that the jumper radius is set to the same as the fillet radius. Since most of the wires I'm putting jumpers on have filleted corners anyway, this gives me a way to change the size of the jumper to match the scale of the rest of the drawing. the line in red gets commented out or replaced with the line below. ; [color=red](setq bDis 0.125) ;; Arc Radius (Break Distance / 2.0 )[/color] (setq bDis (getvar "filletrad")) ;Glen Smith grabbed line of code from Paulmcz to set jumper rad same as fillet rad. Just wanted to say thanks again, I use this routine frequently. Glen Quote
Lee Mac Posted September 8, 2010 Posted September 8, 2010 Thanks Glen, I'm happy that it saves you time my friend Quote
taj250 Posted January 11, 2020 Posted January 11, 2020 On 3/17/2010 at 4:43 PM, Lee Mac said: Ah yes - I suppose this is a workaround: (defun c:jumper (/ *error* A B1 B2 BDIS DOC ENT OV P1 P2 UFLAG VL) (setq bDis 0.04072) ;; Arc Radius (Break Distance / 2.0 ) (defun *error* (msg) (and uFlag (vla-EndUndoMark doc)) (and ov (mapcar (function setvar) vl ov)) (and msg (or (wcmatch (strcase msg) "*BREAK,*CANCEL*,*EXIT*") (princ (strcat "\n** Error: " msg " **")))) (princ)) (setq doc (vla-get-ActiveDocument (vlax-get-acad-object)) vl '("CMDECHO" "OSMODE") ov (mapcar (function getvar) vl)) (while (and (setq uFlag (not (vla-StartUndoMark doc))) (mapcar (function setvar) vl '(0 32)) (setq p1 (getpoint "\nPick INTERSECTION: ")) (setq ent (entsel "\nPick LINE TO BREAK: "))) (setq p2 (osnap (cadr ent) "_nea") b1 (polar p1 (setq a (angle p1 p2)) bDis) b2 (polar p1 (+ pi a) bDis)) (setvar "OSMODE" 0) (command "_.break" b1 b2) (if (> a (/ pi 2.)) (command "_.arc" b2 "_E" b1 "_A" 180.) (command "_.arc" b1 "_E" b2 "_A" 180.)) (setq uFlag (vla-EndUndoMark doc))) (*error* nil) (princ)) nice lisp leemac i have one question about your lisp.if i want to give some distance instead of (osnap (cadr ent) "_nea") this area.how to add?could you help me. thanks advance hussain Quote
BIGAL Posted January 12, 2020 Posted January 12, 2020 The answer appears to be in the 1st line (setq bDis 0.04072) ;; Arc Radius (Break Distance / 2.0 ) Just replace by asking what you want bDis to be don't forget the / 2.0 Not tested (setq bDis (/ (getreal "Enter break distance") 2.0)) Quote
taj250 Posted January 12, 2020 Posted January 12, 2020 42 minutes ago, BIGAL said: The answer appears to be in the 1st line (setq bDis 0.04072) ;; Arc Radius (Break Distance / 2.0 ) Just replace by asking what you want bDis to be don't forget the / 2.0 Not tested (setq bDis (/ (getreal "Enter break distance") 2.0)) hi bigal thanks for the reply. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.