Jump to content

Recommended Posts

Posted

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. 

 

 

 

Posted

Can you attached example drawing

Posted
19 hours ago, mhy3sx said:

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.

Posted
12 hours ago, Danielm103 said:

 

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... 

Posted

I'm still stuck...
Anyone with any good ideas or time to help?
(If we ever meet I'll buy you coffee...)

Posted
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?

Posted
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?

Posted
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
 

Example1.jpg

Posted

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?

Posted

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

Posted (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 by Danielm103
direction invariant
Posted

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?

Screenshot-x.png

OVERLAPPING LINES.dwg

Posted
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.

Posted
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.

Posted

Shucks, sorry about that. I tested it on some random lines and it seemed to work. 

Posted

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. 

image.png.df88b9dc2747a03a9dcc420c1c7e3058.png

 

 

 

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...