I have fixed a bug found by Paul P. where V0410 would not run properly if there was no existing RenumKiCadPCB directory in /users/appdata/roaming (Thanks Paul!).
Also at his suggestion I now show a warning and do not save the updated netlist file if there are netlist errors. This is usually because the netlist is out of date with the schematic and PCB so it makes it easier to fix (just regenerate the netlist from the schematic).
Here’s the link on Github https://github.com/BrianAtDocumentedDesigns/RenumKiCadPCB0401_July12_2019/tree/master
Version 410 has been significantly rewritten as I move towards KiCad integration.
On the journey some bugs were reported (Thanks Alan!)
These bugs which were reported and fixed are:
1) Under some circumstances KiCad uses quotes around reference designations internally. This caused RenumKiCadPCB to treat each refdes as a different type.
2) Renumbering by refdes didn’t work.
3) Selecting “Sort by Refdes” wasn’t remembered after exiting the program even though “Sort by Modules”was.
Also I added a reminder warning that you have to close other versions of the relevant .sch and .kicad_pcb files before renumbering. KiCad doesn’t refresh externally modified files and I didn’t see the benefit of sorting out file lock on Windows, Linux, and Apple given I hope to integrate the code into KiCad and therefore the issue will be moot.
Edit: I rather stupidly forgot the link to the new version ….
I have entirely re-written RenumKiCadPCB into c++ and made it into a GUI (Windows-like) program. All the source files as well as build instructions and a Windows 10 installation file (RenumKiCadPCB.msi) can be found at https://github.com/BrianAtDocumentedDesigns/RenumKiCadPCB0400
I also added a few features and fixed a number of bugs.
As usual, please contact firstname.lastname@example.org with bug reports or feature requests.
I just uploaded V0.352 to Github. This (hopefully) fixed a bug where the system could chose the wrong “Top Layer”. It also (hopefully) corrected an issue with the undocumented AR field in the schematic. The field is not only undocumented, as implemented it can lead to “ghost” components in the file which are not visible to eeSchema or PCBNew. This, in turn led to errors in renumbering which could previously only be corrected by manually editing the schematic file with a text editor.
Although I have tested the code on my system I have not received feedback with respect to whether it works (or builds) for others.
I am re-writing RenumKiCadPCB from scratch in c++. I am doing so in order to learn c++ and wxWidgets and then create a GUI version of the program. Doing so may provide enough of a grounder to produce a version of eeSchema and/or PCBNew with integral renumbering. It should be quite easy to do this once I get the hang of a few parts of the KiCad source. The developers would like to see renumbering “pushed” from PCB to schematic via a netlist update. This probably makes sense in the broader context of things like pin swapping but since no progress has been mode in this direction it will have to work.
I intend to add a number of features to V0.400 (which I might release before V0.500, the GUI version). These are:
- Enable global change to module text angle;
- Enable global change to module text location (i.e. align Value and/or User with Ref, center the text fields on the module;
- Generate a Was/Is file from the PCB;
- Update schematic only using a Was/Is file.
The last two items may seem odd but it looks like updating the schematic only and then using eeSchema to update the PCB using timestamps regenerates the PCB and the netlist directly using KiCad internal functions so this would be a stepping stone to full integration, or at least less likelihood of RenumKiCadPCB getting out of sync with the file formats which appear to evolve and not be well documented. The net result of was/is generation followed by update PCB is substantially identical to pushing a netlist from PCB to schematic.
I would greatly appreciate any feature suggestions, bug reports, or general encouragement.
When I started having trouble with WordPress and zip files I moved the repository for RenumKicadPCB to DropBox. I recently was alerted that for some I had to give a user “permission” to access the link even though it was supposed to be shared. I have no problem with this but I understand some users might so I decided to move the project to Github. Here is the link https://github.com/BrianAtDocumentedDesigns/RenumKicadPCB
I completed a rewrite a couple months but didn’t do all the testing I wish I had.
I’ve found no problems with this code but admit I have been focusing on Kicad proper with the hope the developers will add renumbering to V6.
Let me know if there are issues.
For some reason WordPress is blocking me from using zip files. Here is a link to the file on Dropbox
Direct link (no log in) View file