Use custom field from footprint in schematic / BOM?

Hi All,

the pcbnew docs show in the “Edit Footprint” chapter a field “MPN”, how can I make use of it?

Especially I would like to access custom fields from footprints in the schematic or in the BOM.

When I assign a footprint with a custom field to a symbol, the custom fields don’t show up in the schematic and also don’t show up in the pcb.

I wonder what the custom fields in footprints are intended for.

You can add fields as you see fit . . .

I have two sets of suggested supplier information and some other KiVar stuff . . .

my question is about custom fields in footprints

Have you tried: PCB Editor / Tools / Update Schematic from PCB?

Note: This is the reverse direction from the mormal workflow.

It also has a (apparently on by default) option to update “Other fields”

Same applies . . . you can push these fields to the footprint and visa versa.

Especially I would like to access custom fields from footprints in the schematic or in the BOM.

Forget this idea.
In principle this is possible with this workflow:

  1. first update pcb from schematic (to make sure schematic<–>pcb are consistent)
  2. run “update all fooprints from library” → this imports all footprint fields from FP library to the footprints placed on the board
  3. run update schematic from pcb → this brings back the footprint fields to the corresponding symbol in the schematic.
  4. You can now export the BOM, it includes the footrpint field.

But this is not working flawlessly and it seems it is not a intended workflow.
I also wanted to use FP fields in the BOM, but I have given up.

yes, no success. KiCad 9.01 on Windows.

Thanks, this did the job. It seems that in the schematic editor, assigning a footprint to a symbol deletes the extra fields existing in the footprint. “Update footprints from library” repairs the footprint.

This is not a convenient method.

I’m not sure whether it is intended by the developers to delete custom fields from a footprint when it is assigned to a symbol without this field.

Note that even if could manage to get the FP field into the schematic you will run into multiple roadblocks if you later want to modify the board and assign different footprints. If you change the footprint to a different type (with different custom fields) then the schematic side doesn’t recognize this. You will at first propagate the old FP fields (which are still in the schematic symbol) to the board. And you will probably get conflicts with the custom field strings. Be careful.

’m not sure whether it is intended by the developers to delete custom fields from a footprint when it is assigned to a symbol without this field.

At least my bugreport targeting this topic got closed without a real solution (handling footprint-defined fields between schematic <-->board (#15342) · Issues · KiCad / KiCad Source Code / kicad · GitLab). The explanation was that the recommended workflow defines the schematic as main source of information.
I also guess that with the current data definition, which does not differentiate between fields from symbol or footprint, this is maybe not possible at all.

So I personally have given up on this topic.
As you have recognized this renders custom fields defined in the footprint definition almost useless. (The only usecase I can see is the field is used as positioned placeholder for some info originating in the schematic. like refdes and value string).

The closest open gitlab issue which probably might improve the use of footprint defined fields is this feature request:

In my view, the root cause is that in KiCad, the schematic symbol is the root / origin of a “part”. There is no real “part” to which other attributes (such as schematic symbol and footprint links) are added. I’m not sure how this is handled in database libraries driven design.

Another side effect is that it’s not really possible to move a schematic symbol (“part”) from one schematic sheet to another (for example when changing from single sheet to hierarchical sheet desing as a project grows). At the moment you have to:

  1. Delete the old symbol.
  2. Use “Paste Special” in the other sheet, and then preserve the RefDes.
  3. Re- synchronize by using the RefDes while updating the PCB.

It’s one of the few remaining kludges in KiCad that shows it’s ad hoc grown capabilities grown over it’s history. Apparently there is not much interest in changing / fixing this.

KiCad_MPN_in_footprint

I still don’t understand why pcbnew_V9.pdf has this image on page 42. How is the MPN field in the footprint intended to be used?

still don’t understand why pcbnew_V9.pdf has this image on page 39. How is the MPN field in the footprint intended to be used?

wild guess: At least in the picture it’s not intended to be used. It is simply (like any other custom symbol field) forwarded from schematic to pcb during “update pcb from schematic” command. This update transfers all symbol fields to the footprint (board).

This is correct. This is about modifying already placed footprints (not editing footprints in the library).
I use it this way (as shown on this picture). My template contains extra fields like MFR, PN, etc and when I open each footprint the fields are there and ready to be filled.

I see, thanks for the explanation.

Nevertheless I think it would be useful to be able to have user defined fields in footprint being preserved when the footprint is assigned to a symbol.

Using KiVar I have to be careful of this as KiVar changes the footprint fields which then have to be fed back to the schematic to get the Schematic updated . . . if I forget it’s non-destructive so can be fixed.