Adham Magdy Posted November 29, 2021 Share Posted November 29, 2021 (edited) Hi.. I'm making electrical shop drawings in Autocad and when there are two intersecting lines (wires) I have to put a cutting symbol at one of them and trim the line.. this could happen hundreds of times in a plan drawing.. I created a cutting symbol block and then I insert it manually at each line intersection, rotate it as needed, and then trim the crossing lines manually.. I tried to use the AutoBlockBreak.lsp but it trims all the lines passing through the block.. and I tried putting a wipeout in the block to hide one line but it always hides all.. so is there a way to quickly break the intersecting lines with a symbol while keeping non-intersecting lines connected? I've attached a drawing with examples.. Thanks Drawing1.dwg Edited November 29, 2021 by Adham Magdy Quote Link to comment Share on other sites More sharing options...
Tharwat Posted November 29, 2021 Share Posted November 29, 2021 I already have wiring program and used a lot in Electrical field and also have the Break button to break wires based on the length the use specifies. https://autolispprograms.wordpress.com/wiring-program/ 1 Quote Link to comment Share on other sites More sharing options...
dan20047 Posted November 29, 2021 Share Posted November 29, 2021 For my architectural lighting / switching plans, I use a block with a masking wipeout between the pair of lines to hide the wire below. Avoids the need to trim. 1 Quote Link to comment Share on other sites More sharing options...
Adham Magdy Posted November 30, 2021 Author Share Posted November 30, 2021 14 hours ago, dan20047 said: For my architectural lighting / switching plans, I use a block with a masking wipeout between the pair of lines to hide the wire below. Avoids the need to trim. It should work but changing the line order to only hide a line and leave the other is a bit time consuming since many lines are on the same layer.. Quote Link to comment Share on other sites More sharing options...
Adham Magdy Posted November 30, 2021 Author Share Posted November 30, 2021 16 hours ago, Tharwat said: I already have wiring program and used a lot in Electrical field and also have the Break button to break wires based on the length the use specifies. https://autolispprograms.wordpress.com/wiring-program/ I downloaded the trial version but it doesn't automatically put a crossing block and also it doesn't work well with curved buildings which need angles with non orthogonal routing Quote Link to comment Share on other sites More sharing options...
Tharwat Posted November 30, 2021 Share Posted November 30, 2021 3 hours ago, Adham Magdy said: I downloaded the trial version but it doesn't automatically put a crossing block and also it doesn't work well with curved buildings which need angles with non orthogonal routing It does not add any crossing block but as I already mentioned in my previous post that you can BREAK the wire lines although this option is not available in the trial version but in the permanent one. 1 Quote Link to comment Share on other sites More sharing options...
ronjonp Posted November 30, 2021 Share Posted November 30, 2021 There is also this .. if you can stomach hops 1 1 Quote Link to comment Share on other sites More sharing options...
dan20047 Posted November 30, 2021 Share Posted November 30, 2021 (edited) 8 hours ago, Adham Magdy said: It should work but changing the line order to only hide a line and leave the other is a bit time consuming since many lines are on the same layer.. There is some work, I assume you could have a priority of lines that makes sorting easier. For intersections w/unequal number of lines, you could either scale the block disproportionately, or create blocks with varying ratios. Edited November 30, 2021 by dan20047 (fix draworder) Quote Link to comment Share on other sites More sharing options...
SLW210 Posted November 30, 2021 Share Posted November 30, 2021 Does the AutoCAD Electrical toolset do this? Seems to me it does, I lost the use of mine when they put 32-bit office on my new computer. I need to put in for IT to give me the 64-bit Office so I can go back to using it. I used use a LISP for doing similar in P&IDs, it should be here on CADTutor. I'll see what I can find. 1 Quote Link to comment Share on other sites More sharing options...
SLW210 Posted November 30, 2021 Share Posted November 30, 2021 Here are a few... Object Break | Lee Mac Programming (lee-mac.com) Automatic Block Break | Lee Mac Programming (lee-mac.com) BreakObjects.lsp 1 Quote Link to comment Share on other sites More sharing options...
tombu Posted November 30, 2021 Share Posted November 30, 2021 BreakObjects.lsp newest version 2.3 by Charles Alan Butler June 6,2019 at: http://www.theswamp.org/index.php?topic=10370.0 1 Quote Link to comment Share on other sites More sharing options...
BIGAL Posted December 1, 2021 Share Posted December 1, 2021 Try inserting block with wipeout, but send to back using draw order, you may have to draw order the wire 1st, then the block its a sequence thing of draw order, have used on images old with new portion over top. 3 objects. 1 Quote Link to comment Share on other sites More sharing options...
Adham Magdy Posted December 1, 2021 Author Share Posted December 1, 2021 (edited) 12 hours ago, SLW210 said: Here are a few... Object Break | Lee Mac Programming (lee-mac.com) Automatic Block Break | Lee Mac Programming (lee-mac.com) BreakObjects.lsp The automatic block break works great and also rotates the object.. but it breaks all the lines passing through the block but maybe it can be modded to only break the lines horizontal to the inserted block and ignore other angles, so it only breaks the line on both sides of the block.. Edited December 1, 2021 by Adham Magdy Quote Link to comment Share on other sites More sharing options...
Adham Magdy Posted December 1, 2021 Author Share Posted December 1, 2021 17 hours ago, ronjonp said: There is also this .. if you can stomach hops I love it.. I'll just need to make the hops bigger to be visible on the scale I work on Quote Link to comment Share on other sites More sharing options...
ronjonp Posted December 1, 2021 Share Posted December 1, 2021 (edited) 11 hours ago, Adham Magdy said: I love it.. I'll just need to make the hops bigger to be visible on the scale I work on Change this number whatever you need in the code. (setq a 0.125) Alternatively if you use dimscale for scaling: (setq a (if (= 0 (getvar 'dimscale)) 0.125 (* 0.125 (getvar 'dimscale)) ) ) Or if you want to go the mask route with a block: (defun c:hops (/ a b e pts s x) ;; RJP » 2019-01-21 ;; Creates hops on a selection of intersecting polylines (setq a 0.125) (setq a (if (= 0 (getvar 'dimscale)) a (* a (getvar 'dimscale)) ) ) (cond ((null (tblobjname "block" "RJP_WipeOut")) (entmake '((0 . "BLOCK") (100 . "AcDbEntity") (67 . 0) (8 . "0") (100 . "AcDbBlockReference") (2 . "RJP_WipeOut") (10 0. 0. 0.) (70 . 0) ) ) (entmake '((0 . "LWPOLYLINE") (100 . "AcDbEntity") (67 . 0) (8 . "0") (62 . 7) (420 . 16777215) (100 . "AcDbPolyline") (90 . 2) (70 . 129) (43 . 0.5) (38 . 0.) (39 . 0.) (10 -0.25 0.) (40 . 0.5) (41 . 0.5) (42 . 1.) (91 . 0) (10 0.25 0.) (40 . 0.5) (41 . 0.5) (42 . 1.) (91 . 0) ) ) (entmake '((0 . "ENDBLK") (100 . "AcDbBlockEnd") (8 . "0"))) ) ) (cond ((and (setq s (ssget ":L" '((0 . "lwpolyline")))) (> (sslength s) 1) (setq s (mapcar 'vlax-ename->vla-object (vl-remove-if 'listp (mapcar 'cadr (ssnamex s))))) (setq b s) ) (foreach e s (if (setq pts (apply 'append (mapcar '(lambda (x) (vlax-invoke e 'intersectwith x acextendnone)) (setq b (cdr b)) ) ) ) (while (caddr pts) (entmake (list '(0 . "INSERT") '(8 . "Mask") '(2 . "RJP_WipeOut") (cons 10 (mapcar '+ pts '(0 0 0))) (cons 41 a) (cons 42 a) (cons 43 a) '(50 . 0.) ) ) (setq pts (cdddr pts)) ) ) ) ) ) (princ) ) (vl-load-com) Edited December 1, 2021 by ronjonp 1 Quote Link to comment Share on other sites More sharing options...
Adham Magdy Posted December 1, 2021 Author Share Posted December 1, 2021 36 minutes ago, ronjonp said: Change this number whatever you need in the code. (setq a 0.125) Alternatively if you use dimscale for scaling: (setq a (if (= 0 (getvar 'dimscale)) 0.125 (* 0.125 (getvar 'dimscale)) ) ) Or if you want to go the mask route with a block: (defun c:hops (/ a b e pts s x) ;; RJP » 2019-01-21 ;; Creates hops on a selection of intersecting polylines (setq a 0.125) (setq a (if (= 0 (getvar 'dimscale)) a (* a (getvar 'dimscale)) ) ) (cond ((null (tblobjname "block" "RJP_WipeOut")) (entmake '((0 . "BLOCK") (100 . "AcDbEntity") (67 . 0) (8 . "0") (100 . "AcDbBlockReference") (2 . "RJP_WipeOut") (10 0. 0. 0.) (70 . 0) ) ) (entmake '((0 . "LWPOLYLINE") (100 . "AcDbEntity") (67 . 0) (8 . "0") (62 . 7) (420 . 16777215) (100 . "AcDbPolyline") (90 . 2) (70 . 129) (43 . 0.5) (38 . 0.) (39 . 0.) (10 -0.25 0.) (40 . 0.5) (41 . 0.5) (42 . 1.) (91 . 0) (10 0.25 0.) (40 . 0.5) (41 . 0.5) (42 . 1.) (91 . 0) ) ) (entmake '((0 . "ENDBLK") (100 . "AcDbBlockEnd") (8 . "0"))) ) ) (cond ((and (setq s (ssget ":L" '((0 . "lwpolyline")))) (> (sslength s) 1) (setq s (mapcar 'vlax-ename->vla-object (vl-remove-if 'listp (mapcar 'cadr (ssnamex s))))) (setq b s) ) (foreach e s (if (setq pts (apply 'append (mapcar '(lambda (x) (vlax-invoke e 'intersectwith x acextendnone)) (setq b (cdr b)) ) ) ) (while (caddr pts) (entmake (list '(0 . "INSERT") '(8 . "Mask") '(2 . "RJP_WipeOut") (cons 10 (mapcar '+ pts '(0 0 0))) (cons 41 a) (cons 42 a) (cons 43 a) '(50 . 0.) ) ) (setq pts (cdddr pts)) ) ) ) ) ) (princ) ) (vl-load-com) Thanks.. this helps greatly Quote Link to comment Share on other sites More sharing options...
SLW210 Posted December 2, 2021 Share Posted December 2, 2021 On 12/1/2021 at 2:55 AM, Adham Magdy said: The automatic block break works great and also rotates the object.. but it breaks all the lines passing through the block but maybe it can be modded to only break the lines horizontal to the inserted block and ignore other angles, so it only breaks the line on both sides of the block.. Perhaps contact Lee Mac directly on his site. 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.