jaredlauer Posted November 7, 2014 Share Posted November 7, 2014 I'd like to create a macro that can create a crossover when I have two wires crossing one another. Basically it will turn this: | | ----|----- | | into this | | ----(---- | | The way I have been doing it is to draw and place the arc, then break the vertical wire and connect the two pieces to the endpoints of the arc. I have to do this dozens of times for every drawing and it would be nice to have a function to do this for me. Any help would be greatly appreciated. Thanks. Quote Link to comment Share on other sites More sharing options...
ReMark Posted November 11, 2014 Share Posted November 11, 2014 Wiring schematics. Have you given any thought to moving to AutoCAD Electrical? ACADE has a "jumper" feature built in. One possible option would be to use a block for the jumper combined with Lee Mac's custom lisp routine called "Automatic Block Break". Take a look at the routine's description here... http://lee-mac.com/autoblockbreak.html Quote Link to comment Share on other sites More sharing options...
BIGAL Posted November 14, 2014 Share Posted November 14, 2014 As a lisp pick line 1, pick line 2, using inters you get crossing point, break line and add arc maybe also rejoin as pline. Search here for break line pretty sure one has add a line in gap. Quote Link to comment Share on other sites More sharing options...
YZ Posted November 17, 2014 Share Posted November 17, 2014 You can speed this up with a macro. It won't automate it to the extent of AutoCAD Electrical's built-in, nor will it be as intelligent as BIGAL's lisp suggestions. But if you break down the steps they can all be written into a single macro. You draw the arc first? Is it the same every time? Can you create it as a block? What if you placed the arc directly onto the line, and then trimmed the line? (As opposed to breaking the line, and then placing the arc to match). Finally, is there an intersection snap point between the 2 crossing lines? (are they on the same plane?) If your answer to the above 3 questions is yes then I think you could write a macro that will do this in 1 single pick. Quote Link to comment Share on other sites More sharing options...
BIGAL Posted November 20, 2014 Share Posted November 20, 2014 Try This (defun C:arcbrk ( / st1 st2 end1 end2 obj1 obj2) ; rad is 20.0 1/2 rad is 10 below ; By BIGAL NOV 2014 (setvar "osmode" 0) (setq obj1 (entget (car (entsel "\npick 1st line")))) (setq st1 (list (nth 1 (assoc 10 obj1))(nth 2 (assoc 10 obj1)) )) (setq end1 (list (nth 1 (assoc 11 obj1))(nth 2 (assoc 11 obj1)) )) (setq ang1 (angle st1 end1)) (setq obj2 (entget (Car (entsel "\npick 2nd line")))) (setq st2 (list (nth 1 (assoc 10 obj2))(nth 2 (assoc 10 obj2)) )) (setq end2 (list (nth 1 (assoc 11 obj2))(nth 2 (assoc 11 obj2)) )) (setq ang2 (angle st2 end2)) (setq halfang (/ (+ ang1 ang2) 2.0)) (setq pt3 (inters st1 end1 st2 end2)) (command "circle" pt3 20.0) (setq obj3 (entlast)) (setq pt4 (polar pt3 ang1 25.0)) (command "trim" pt4 "" (entlast) "") (setq pt4 (polar pt3 ang1 5.0)) (command "trim" (entlast) "" pt4 "") ) Quote Link to comment Share on other sites More sharing options...
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.