Save changes on footprint to library and board

When editing a footprint on the Footprint Editor there is an icon that changes whether I open Footprint Editor from Pcbnew or from “Kicad main window”.

image image

This is the second time I made a mistake on a PCB production because I loaded a footprint that I used before however, the corrections I did on the past I had only saved on board and not to library too.

I think this happens because I use Footprint Editor for both corrections and to create new footprints, which make it hard to keep up the context.

I would like to know if it is something that only happens to me or if you think that both icons should exist and disable when not used like “Save changes to board” when opened from “Kicad main window”.

I think I have fell into the same trap a couple of times and learned after that.

KiCad does already quite much to prevent that problem:

  • You have to click either Edit Footprint or Edit Library Footprint
  • Different icon
  • Different tooltip
  • Different File menu item, but only in 5.99

But still I understand that someone finds this problematic.

Would it help at all if you would see a message on top of the view which says “Changed footprint was saved to the board”? Would it draw your attention so that you would immediately remember that it wasn’t saved to the library?

EDIT: in similar manner as in this:

image

I use the shortcut and didn’t notice that there two different options to edit a footprint from pcbnew.

In my opinion two buttons is the clearer way but a message should help.

Yep, also happened to me :slight_smile:

This can be a real surprise if you do not know that those icons and save functions in the Footprint editor change, depending on the origin of the Footprint.
Especially if you had not realized yet that the PCB has copies of the footprints embedded in the file.
Realizing this happens is already a big step of not making the same mistake again.
But once you know this, it’s not too difficult to work with it.

The Default KiCad libraries are read-only. (And for good reasons!) So you do not have the option to save the changes back into those libraries.

I do not know whether I like the ease of being able to modify a footprint by loading it from a PCB directly into the footprint editor, or I dislike it because you have to think more about managing footprints both in PCB files and (custom) footprint libraries.

My own projects develop very slowly, they can take several years, and in that time may see multiple KiCad versions with different library versions, and I had some trouble with those. So now I’ve settled on using the default libraries for creating a project (they’re quite good now), but then quickly copy all used schematic symbols and footprints used in a project to project specific libraries.

In Pcbnew there is:
Pcbnew / File / Archive Footprints
This can export all used footprints and even make a project specific library to put them in.

Synchronizing this with the schematic is another story though.

In the end it comes down to first knowing that these options are available (which will be a surprise to many newcomers, and many may get confused by this) and then choosing a work flow that suits you and sticking with it.

As a little test I made a little project this afternoon, with 2 resistors:
image

I assigned a 0805 footprint to both, then [F8] to Pcbnew and then [Ctrl + e] to edit one of the footprints, and saved it directly back to the PCB, with result:

After that I went back to the schematic and did an update with [F8] again.
Pcbnew retains the modified footprint, regardless of the settings during the update.

Then:
Pcbnew / File / Archive Footprints / Create new library and Archive Footprints

After that I opened the Footprint editor from the project manager and looked into the library, and it only has the original 0805, not the modified one.
The easiest way I know to put such a modified footpint in a library is to select a footprint on the PCB in Pcbnew, then Edit it with the footprint editor and:
Footprint Editor / File / Save as
Then select your project specific library and save it under a new name.
To make the circle complete, you also have to update the footprint link in the schematic to reference the changed footprint.

Another confusing part for newcomers, (and also long time users) is the different behaviour of Eeschema and Pcbnew in “standalone mode”.

It feels like I’m rambling too much today.
Does this add anything useful?

I open PCBNew and when I click on a footprint I only have the option to Open in Footprint Editor.

I know that but changing the context multiple times make me think I’m saving to library while I’m not.

Ah, I didn’t even remember that it’s directly in the context menu. I thought only about the Properties dialog of the footprint.

I can see how KiCad doesn’t make clear what the expectations should be for a newcomer.

I filed an issue for this: https://gitlab.com/kicad/code/kicad/-/issues/5294

1 Like

The true is that I’m not a newcomer and use KiCad since 2011 on personal and professional projects. The problem in my opinion is that our focus isn’t always at 100% on what we are doing so if UX can help us is a plus. Almost all the times when I use Footprint Editor I save to board and and also save as to library.

Thank you

1 Like

Still it’s especially confusing for newcomers. You are right about us not being focused: think about a situation when you think whether to edit the library or first test with a board footprint, decide to open the board footprint first, then comes the boss to discuss about the weather, you forget what you were doing, continue later without thinking twice… Basics of UI design.

1 Like

Related issues regarding situations where you would like KiCad to work in a ‘locked’ mode where ‘everything’ should be in sync with the libraries:


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