Delete ALL tracks/Traces in Schematic leaving components

Hello,

I have a Schematic with over 100 components and they are all connected with tracks (or traces) ?

What I want to do is delete everything leaving just the components on the schematic like starting over but with all the components there.

Is there a way to do this?
Thanks

OK…I will ask the obvious question: Why not open up the schematic and simply delete the traces? I do not mean to discourage questions on the forum. But I would think that simply editing the schematic like this would take less time than asking the question on the forum and taking advantage of a creative reply.

2nd: Not sure why anyone would want to do what you ask about.

3rd: Understand that the KiCad data files are open source. Make a much simpler schematic which has a few components and a few wires. Then make a copy and delete the wires in the copy of the file. Now view and compare the two schematic files with a text editor and see what is the difference is between the two. That should tell you what is symbols and what is wires in the schematic text file. That would tell you what to delete if you want to edit your larger schematic with a text editor. I am not sure there would be any advantage to this but it might be quicker if you are skilled with a text editor.

I don’t see any obvious way to do that, unlike in pcbnew where you can selectively delete. Of course it’s possible to modify the file with a script. This is for 5.1, I don’t know about 5.99. BTW they are wires or buses in the schematic. When realised on a PCB they become tracks or traces. vias or even PTHs.

Edit: I can understand you don’t want to lay down symbols again, but if you have a sheet of symbols aren’t you more likely to make a wrong connection somewhere? If the mistake is small couldn’t you just rewire that area? Or are you trying to clean up a schematic made by someone else?

BobZ,
With all due respect, I would have to assume you have not created any complex schematics to make that reply.

I’m being sincere. The time it takes to delete several hundred connections is daunting and tedious.
I mean no disrespect, but I do not think you comprehend the task.

Thanks.
I haven’t found a convenient way to do it yet.

It’s an older board with numerous components that have been superseded by newer more efficient and compact components. it needs a complete re-do unfortunately.

I have been a design engineer since 1975 and I have created some designs with maybe 200-300 components. The thing I have not done is tried to delete all of the wires. I would put it in the huge class of tasks for which I think of no reason to attempt. Do you know that (at least in 5.99) if you drag a select box from lower right to upper left, you get “greedy select”? In many locations you should be able to carefully delete many wires with one select and one click. EDIT: One select and one press of the delete key.

3 Likes

The easiest way I know to delete all the wires (without writing a script) is to draw a pink box with the mouse and press the Delete key for every box. You have to make sure the box contains no schematic symbol, just wires.

Thanks,

Yes, that appears to be the only way.
PCBNEW has a Global Delete function.

I was somewhat hoping Eeschema had a similar function that I had missed.

I wonder if you open the sch file with a text editor, you might be able to build a few macros to del the wires. Or maybe in a csv editor.

1 Like

The only way I can produce macros is with a pasta rolling machine or similar. Did I get that right? :grinning:

Open the .sch_kicad in VScode, CTRL+Shift+H to Replace in File, copy ^.*wire.*$\n^.*.*$\n^.*.*$\n^.*.*$\n
in the Search field and a space in the Replace field, CTRL+Alt+Enter to delete all wires. If you have hierarchic sheets, you need to open them all if you want all wires deleted in them too.

6 Likes

Excellent. A Regex expression to find and delete the wires from the .sch file.

Thank you!

Glad to help! I’m not proficient in Python, got to use what I know how to Google :slight_smile:

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.