I have been working for several months to incorporate RenumKicadPCB functionality inside Kicad. Meanwhile, Alexander Shuklin has done most of the heavy lifting by writing back-annotation into Kicad which does all of the error checking, etc., necessary for reannotation to work. Without his help I don’t think I could have done this.
Geographical re-annotation is under PCBNew/Tools. It should provide the same functionality as RenumKicadPCB but from within Kicad. I am hopeful I can submit a merge request which will be accepted so it will become part of the distribution. Of course, given my modest c++ skills I suspect that will not go smoothly!
I have tested the code with all the projects I used to test RenumKicadPCB and it appears to work. Besides renumbering correctly, it seems to detect project errors such as modules in the PCB which are not in the schematic, etc.
I would be grateful if people who are interested in this functionality would help test it and let me know if they have any problems or suggestions.
The source code is at
Of course this is test software and not yet part of the official Kicad distribution.
Do you happen to have a compiled version of this for Windows you could share?
I’m usually a Linux user but on Windows 10 at the moment…so it would take me a while to figure out how to get this build.
I’d really appreciate it.
I certainly do have a compiled version of Windows as I developed it on Windows. The problem is that the Windows development environment results in a sort of linux-like tree structure (bin/etc) and I have to figure out how to bundle it up for use in a proper Windows environment. I’ll let you know when I figure this out.
/work/ohjelmointi/kicad/kicad/pcbnew/tools/pcb_renum_tool.cpp:5:10: fatal error: dialogs/DIALOG_BOARD_RENUM_base.h: No such file or directory
#include <dialogs/DIALOG_BOARD_RENUM_base.h>
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If I change it to lowercase (as the file name actually is lowercase in the filesystem) it can continue compiling. (EDIT: the other similar line, too.)
Remember that Unix system are usually case sensitive. Everything must be exactly as written.
Use other dialogs as model for the UI strings. Many of the strings should be Sentence case, not Title Case.
I have tried the UI builder for wxWidgets only once and gave up, but I can see you haven’t used wxWidget’s possibilities to organize the elements properly. Everything should be aligned horizontally and vertically in a grid. It would be better to use some group boxes. Colons are missing from all the labels and probably the labels and the corresponding items aren’t coupled.
(EDIT: the button box in the bottom should be standardized, too. I think there’s a dedicated wxWidgets class for that.)
Maybe you can read the UI code of some other dialogs and find inspiration and examples there?
I’m on mobile so perhaps you’ve linked to this but can you provide more details on the compiler extensions?
On the strings I’ll change them when I get home but I avoided wxprintf because it set faults with no diagnostic information if there is a miss match between format and arguments and gcc doesn’t warn like it does for printf.