Fields from library don't transfer into schematic

My Version: 4.0.4+e1-6308~48

I am trying to build a fully defined library using fields. This means each part in my library gets its own manufacturer number, footprint assignment etc.

Now I face the problem that a field which is defined in the library is not inserted in the schematic when I put that part into the schematic. Example:
My library file:

#encoding utf-8
#
# C
#
DEF C C 0 10 N Y 1 F N
F0 "C" 25 100 50 H V L CNN
F1 "C" 25 -100 50 H V L CNN
F2 "" 38 -150 50 H V C CNN
F3 "" 0 0 50 H V C CNN
F4 "testmpn" 125 200 60 H V C CNN "mpn"
F5 "tdk" 225 300 60 H V C CNN "manufact"
$FPLIST
 C?
 C_????_*
 C_????
 SMD*_c
 Capacitor*
$ENDFPLIST
DRAW
P 2 0 1 20 -80 -30 80 -30 N
P 2 0 1 20 -80 30 80 30 N
X ~ 1 0 150 110 D 50 50 1 1 P
X ~ 2 0 -150 110 U 50 50 1 1 P
ENDDRAW
ENDDEF
#
#End Library

and then the resulting schematic file after inserting the part “C”:

$Descr A4 11693 8268
encoding utf-8
Sheet 1 1
Title ""
Date ""
Rev ""
Comp ""
Comment1 ""
Comment2 ""
Comment3 ""
Comment4 ""
$EndDescr
$Comp
L C C?
U 1 1 5814EC36
P 5300 1900
F 0 "C?" H 5325 2000 50  0000 L CNN
F 1 "C" H 5325 1800 50  0000 L CNN
F 2 "" H 5338 1750 50  0000 C CNN
F 3 "" H 5300 1900 50  0000 C CNN
    1    5300 1900
    1    0    0    -1  
$EndComp
$EndSCHEMATC

There are the fields F4 and F5 missing. Even in the cache.lib those fields are missing.
Why that? Is this a bug or wanted or am I doing something wrong?

… you need to set up EEschema to have those fields:

yes I already saw that too. Thank you! The problem is , if I enable a default field, this field will exist in the schematic but the value is not taken from the library. It has always the predefined default value.
What I need is the ability to define field/value pairs already in the library. If I cant do this, I have to edit each single part in my schematic which is 1. a lot of redundant work and 2. very error prone.

How did you create + populate those fields in your library symbols?

To solve your problem…
Are you 110% sure the field descriptors “manufact” and “mpn” are exactly the same in your EEschema settings and in the same order?
Can you get me a screenshot of EEschema > Preferences > Schematic Editor Options > Default View Tab please?

Another question, can you get me a screenshot of EEschema > Preferences > Component Libraries please?
Did you make sure that your custom library with that ‘C’ from TDK in there is the first ‘C’ in your library list, or are there other libraries in front of it?

OK, thank you very much! Now it is working. Even without using default fields as it should be. The problem was that I had two libraries inside the path. One library with the part “devices/C” having the fields undefined and one library “cap/C” with defined fields. It seems Eeschema chose “devices/C” even though I added “cap/C”

The funny thing is that the preview still shows the field values “tdk” and “testmpn”

But I think kicad doesnt use unique URI etc for identifying the components well. Therefore that confusion.

And another question: Do you know how to get rid of the search paths “/usr/share/…”? I would like to use my own libraries.

…and the second screenshot:

That should get you going:

PS: The order of libraries is important. EEschema always picks the first appearance of ‘C’ if you want to load a ‘C’, no matter if you selected another ‘C’ further down in a different library. This should change in the future, but for now you have to work with it.

PPS: don’t worry about the /user/share path if you want to use your own libs only. My installation has it too, but I don’t have any libs from that place loaded as my template project (kicad.pro) only loads my own libs (see above thread for details).

PPPS: that one might also be interesting for you