Renumbering parts

Hello…

I just starting with kicad and find one bad property for me.
Lets view as an example.
I have 4 resistors placed in schematics in 4 corners of square and routed the board.
The resistor are numbered as
R1 R2
R3 R3

Then I find that I need another one resistor and I added it in schematics in the center and now I have

R1 R2
R?
R3 R4

Now the question is how to enumerate that as board is already routed. (I came from eagle and this is easy done)

I managed to got
R1 R2
R5
R3 R4

But I want annotation to go linear trough entire schematic to get something like

R1 R2
R3
R4 R5

Without need to redraw entire board.

Thanks
eSlavko.

re run annotation with the option reset the current annotation selected.
(Be careful with this if you already started routing your pcb. While importing the netlist you then need to use by timestamp instead of by reference.)

1 Like

Thanks for the recommendation Andy - I wrote RenumKicadPCB.

The most recent download can be found here at https://documenteddesigns.com/2017/03/27/renumkicadpcb-v0203/

I hope to one day learn how to write a Gui for it!

1 Like

Hello…

Actually I look for renumbering schematics to be in order and not PCB,
Reset current annotation and import by time stamp seems to do the job,
But also seems to be good practice to backup project before doing that as if only one option from above is selected the board is wrecked. As Rene says need to be extreme careful when doing that.

2 Likes

The “Dry Run” option on the Netlist Import menu can be very helpful, especially if you aren’t making too many changes at once. Do the netlist import and read the “Actions”, “Warnings” and “Errors” in the “Messages” box. Shouldn’t be any Warnings or Errors; and looking carefully at the Actions will show you whether the changes to the layout are what you expect.

Dale

2 Likes

Even better than dry run, get used to using a source control system such as Git or Subversion - GUI tools available - to keep a permanent record of all steps.
If you do this, remember to track your personal libraries as well!

2 Likes

How to do that? Actualy I never think about that. I do rdiff-backup on external drive every day and have all daily changes stored on external drive. But never think to use git or something to keep “hourly” versions.

There are good tools out there to support you with using git. I think there is even a graphical diff tool that can show what has changed.
(There are some topics on this forum about this. A quick search and i found this one.)

Hi, while there are many guides to using Git, Subversion and the many other tools, what it boils down to is to tell the tool when you have made a “significant” change, preferably one that is in self-contained (i.e. not part-baked) and give that change a name. The tool keeps track of the changes, and lets you rewind the files to a past state, view the sequence of changes made so far, and display what actually changed at what point.

For Git, using the basic Terminal tools (many others available):

Get started:

cd MyProjectFolder;
# create the files git needs to track this folder and its subfolders:
git init

# add all files in this directory to the list of those being tracked:
git add .

# and save this as the initial state:
git commit -m'new project'

… make changes in kicad and save them, then:

git diff

will tell you how the files actually changed as a result of the edits.

git add ... files... main.sch
git commit -m'Added new power system'

To explore the history of changes, use:

git log

rivimey that’s nice tutorial as I’m not git user. You have just one typo in second command from the end. Double quotation instead single.
But now I have even more questions.
How to add all changes in the folder?
Initial was "git add . " but I got some complains running it second time.
And how to revert to files to saved version?

Hello…

If someone else want backup I offer other version.
All command must be run from inside directory to be backed up.

> #To make backup
> rdiff-backup . `pwd`_RdiffBackup

> #To see lists of increments
> rdiff-backup -l `pwd`_RdiffBackup
>  
> #To restore
> rdiff-backup --force -r 0B `pwd`_RdiffBackup .		//latest version
> rdiff-backup --force -r 1B `pwd`_RdiffBackup .		//previous version
> rdiff-backup --force -r 2B `pwd`_RdiffBackup .		//even older version

The Backup is stored as new folder named
CurrentFolder_RdiffBackup

I assume you have multiple commits and want to go back to an earlier commit.
Simply use git checkout [commit hash] to checkout a specific commit. (You can then point a new branch to this specific commit with git checkout -b)

If you want to revert your changes you made since your last commit simply use git reset or git checkout . (This will delete your changes.)

Use git stash to put your changes onto a stack if you just want a temporary reset. more details: https://git-scm.com/book/en/v1/Git-Tools-Stashing)

You can also install a graphical interface for git if you think this might help.

You can also watch this video about the basics of git
A lot of tutorials can be found on the atlasin webside:

Thanks all for GIT infos. Bit seems overcomplicated for job need to be done.
I think rdiff-backup is better tool to do that. (to make backup on local drive)

Maybe someone will find that info useful.

Slavko.