Anders M Posted February 4 Posted February 4 Hello. I'm looking for a AutoCAD LISP that works similar to the overkill-command, but selects or deletes both overlaping lines. Best regards Anders M. Quote
mhy3sx Posted February 4 Posted February 4 (edited) I find this lisp here https://www.youtube.com/watch?v=vTHZf4rqzn0 SOVL-Select Overlapping Objects-demo.VLX And is another post with polyines here https://www.cadtutor.net/forum/topic/86162-detect-overlapping-polylines-and-draw-lines/ Edited February 4 by mhy3sx Quote
Danielm103 Posted February 4 Posted February 4 here’s a python example if your interested https://www.cadtutor.net/forum/topic/96281-find-overlapping-lines-with-python/ Quote
Anders M Posted February 5 Author Posted February 5 19 hours ago, mhy3sx said: I find this lisp here https://www.youtube.com/watch?v=vTHZf4rqzn0 And is another post with polyines here https://www.cadtutor.net/forum/topic/86162-detect-overlapping-polylines-and-draw-lines/ Thank you very much, but he first one has timed-out an is not available anymore, it says so when I try to run it. The second one has so much edits in the thread, I cant find out wich one is the final solution. Quote
Anders M Posted February 5 Author Posted February 5 12 hours ago, Danielm103 said: here’s a python example if your interested https://www.cadtutor.net/forum/topic/96281-find-overlapping-lines-with-python/ Im not that used to scripts but I tried posting the code using the 'run script' function, but that failed, saying 'unknown command' on many parts. I tried to erase those parts (I have not done any coding since the days of floppy-disks) and it runed, but returned the message ' Drawing1.scr can't find file '. And the overlaping lines are still there... Quote
Anders M Posted February 11 Author Posted February 11 I'm still stuck... Anyone with any good ideas or time to help? (If we ever meet I'll buy you coffee...) Quote
Jonathan Handojo Posted February 12 Posted February 12 15 hours ago, Anders M said: I'm still stuck... Anyone with any good ideas or time to help? (If we ever meet I'll buy you coffee...) What about if the line is partially overlapped? Quote
Tharwat Posted February 12 Posted February 12 On 2/4/2025 at 1:33 PM, Anders M said: Hello. I'm looking for a AutoCAD LISP that works similar to the overkill-command, but selects or deletes both overlaping lines Are you referring to line objects or more like polylines? Quote
Anders M Posted February 12 Author Posted February 12 1 hour ago, Tharwat said: Are you referring to line objects or more like polylines? 6 hours ago, Jonathan Handojo said: What about if the line is partially overlapped? It is a enormous file of 'AI' generated contor lines, created from a LIDAR (I think) scanning, covering the entire county. It contains thousands of double lines, where the AI decided to create a 'spike' of two overlapping lines instead of 'zic-zac' and, sometimes creating a 'handle' to a nearby cluster instead of making them an 'island' as intended. I have no access to the 'raw' data to make lines of my own, and no clue who made it, so I have to try to handle them as they are. The attached sketch shows those double lines as red in 'A' and how I want it to be in 'B'. (In reality they are all black). They are all basic autocad 'lines', no polylines, and they cover eachother totally. I'd like a LISP that either selects them, puts them in a new layer, or deletes them. (There are allso 'loops' (the blue ones) but they are not double lines, so I have to deal with them later.... ) Best regards Anders Quote
GLAVCVS Posted February 12 Posted February 12 Those blue loops are what we technically call 'estrangulaciones' here. These are enclosures that contact other enclosures at only 1 point. The rule says that if they do not contact another enclosure at more than 1 point, they must be completely separated (1 centimeter, for example). So when you deal with them, you will do this. Do I understand correctly? Quote
GLAVCVS Posted February 12 Posted February 12 As for the duplicate lines, my approach would be to do a full scan of the entire drawing and respect only the lines that coincide at both ends with two different lines Running a code like this on a large drawing like yours would be to put it into operation and take 5 minutes (or more) to buy that coffee for whoever wrote the code That said: when you finished drinking your coffee, the work would be done Quote
Danielm103 Posted February 12 Posted February 12 (edited) If the lines are exact duplicates, this routine should erase them Your profile says your running AutoCAD 2025 Load the ARX file (Arx25speed) and run the command NUKEDUPLS The source is included Arx25speedDupl.zip Edited February 13 by Danielm103 direction invariant Quote
masterfal Posted February 13 Posted February 13 I can never get overkill to remove all the lines i need it too. i've attached an example of a drawings which has overlapping lines which remain after running overkill. never understood why they don't get removed with overkill Is there any better way of removing overlapping lines? OVERLAPPING LINES.dwg Quote
marko_ribar Posted February 13 Posted February 13 Maybe, and just maybe, my version can help... You must be logged to access web page... Here is the link : https://www.theswamp.org/index.php?topic=49862.0 HTH. M.R. Quote
GLAVCVS Posted February 13 Posted February 13 22 hours ago, GLAVCVS said: As for the duplicate lines, my approach would be to do a full scan of the entire drawing and respect only the lines that coincide at both ends with two different lines Running a code like this on a large drawing like yours would be to put it into operation and take 5 minutes (or more) to buy that coffee for whoever wrote the code That said: when you finished drinking your coffee, the work would be done @Anders M If my interpretation is correct, this means that if, in any case, there are segments similar to the red ones but they are not duplicated, you should also delete them. Quote
Anders M Posted February 13 Author Posted February 13 13 hours ago, Danielm103 said: If the lines are exact duplicates, this routine should erase them Your profile says your running AutoCAD 2025 Load the ARX file (Arx25speed) and run the command NUKEDUPLS The source is included Arx25speedDupl.zip 49.17 kB · 7 downloads It doesn't work... After running it returns "ArxTemplate::ArxTemplate_nukedupls 0.000025", but the double lines are still there. Quote
Anders M Posted February 13 Author Posted February 13 6 hours ago, marko_ribar said: Maybe, and just maybe, my version can help... You must be logged to access web page... Here is the link : https://www.theswamp.org/index.php?topic=49862.0 HTH. M.R. I tried to register, but it called me a 'spam'... Quote
Danielm103 Posted February 13 Posted February 13 Shucks, sorry about that. I tested it on some random lines and it seemed to work. Quote
BIGAL Posted February 13 Posted February 13 Just a comment when inserting windows using software I have the wall is broken and capped, so there is no line under the window. Maybe look at how your drawing the window. 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.