Can't Edit Library Using KiCAD

Hello Everyone,
New KiCAD user here. Recently installed 4.0.4 in Windows 7, and I’m not able to add a component symbol to a library or modify a component symbol within a library. I was just about to give up and uninstall KiCAD, but then I tinkered with the library files and came up with a work-around: I create or edit a symbol in KiCAD (or some external symbol maker) and save it as a new file. Then I use a text editor to copy-and-paste the text from each separate symbol file and concatenate them into the library file. Here is r.lib, mc14541b.lib, and tp5089n.lib combined into my own library,
C:\Users\mjjtunes\Dropbox\Kicad Projects\MikeLibrary\mikeparts.lib

EESchema-LIBRARY Version 2.3
#encoding utf-8
#
# R
#
DEF R R 0 0 N Y 1 F N
F0 “R” 80 0 50 V V C CNN
F1 “R” 0 0 50 V V C CNN
F2 “” -70 0 50 V V C CNN
F3 “” 0 0 50 H V C CNN
$FPLIST
R_*
Resistor_*
$ENDFPLIST
DRAW
P 12 0 1 0 0 100 20 90 -20 70 20 50 -20 30 20 10 -20 -10 20 -30 -20 -50 20 -70 -20 -90 0 -100 N
X ~ 1 0 150 50 D 50 50 1 1 P
X ~ 2 0 -150 50 U 50 50 1 1 P
ENDDRAW
ENDDEF
#
# MC14541B
#
DEF MC14541B U 0 40 Y N 1 F N
F0 “U” 220 610 75 H V C CNN
F1 “MC14541B” 250 510 60 H V C CNN
F2 “” 0 0 50 H I C CNN
F3 “” 0 0 50 H I C CNN
DRAW
S -320 -440 340 440 1 0 0 f
X Rtc 1 -520 0 200 R 50 50 1 1 I
X Ctc 2 -520 -180 200 R 50 50 1 1 I
X Rs 3 -520 -360 200 R 50 50 1 1 I
X AR 5 -520 360 200 R 50 50 1 1 I
X MR 6 -520 180 200 R 50 50 1 1 I
X Vss 7 0 -640 200 U 50 50 1 1 W
X Q 8 540 360 200 L 50 50 1 1 O
X Q/Q’ 9 540 180 200 L 50 50 1 1 I
X MODE 10 540 0 200 L 50 50 1 1 I
X A 12 540 -180 200 L 50 50 1 1 I
X B 13 540 -360 200 L 50 50 1 1 I
X VDD 14 0 640 200 D 50 50 1 1 W
ENDDRAW
ENDDEF
#
# TP5089N
#
DEF TP5089N U 0 40 Y N 1 F N
F0 “U” 170 590 75 H V C CNN
F1 “TP5089N” 210 500 60 H V C CNN
F2 “” 0 0 60 H I C CNN
F3 “” 0 0 60 H I C CNN
DRAW
S -400 440 400 -540 0 1 0 f
X VDD 1 0 640 200 D 50 40 1 1 W
X Tone_Disable 2 600 200 200 L 50 40 1 1 I
X Col_1 3 -600 340 200 R 50 40 1 1 I
X Col_2 4 -600 240 200 R 50 40 1 1 I
X Col_3 5 -600 140 200 R 50 40 1 1 I
X VSS 6 0 -740 200 U 50 40 1 1 W
X Osc_In 7 600 -240 200 L 50 40 1 1 I
X Osc_Out 8 600 -440 200 L 50 40 1 1 O
X Col_4 9 -600 40 200 R 50 40 1 1 I
X Mute_Output 10 600 60 200 L 50 40 1 1 O
X Row_4 11 -600 -440 200 R 50 40 1 1 I
X Row_3 12 -600 -340 200 R 50 40 1 1 O
X Row_2 13 -600 -240 200 R 50 40 1 1 I
X Row_1 14 -600 -140 200 R 50 40 1 1 I
X SingleTone_Inh 15 600 -80 200 L 50 40 1 1 O
X Tone_Out 16 600 340 200 L 50 40 1 1 T
ENDDRAW
ENDDEF
#
End Library

…It’s time-consuming–but it works! My fear is that I’m seriously misunderstanding how KiCAD works and that I’m going to run into bigger problems later. I’ve tried studying the documentation and YouTube videos, to no avail. I think I need screenshot-by-screenshot instructions. Any help would be appreciated.

Out-of-the-box KiCAD uses the github repositories for symbols and footprints.
As you already found out symbols are chunks of information in .lib files (with some extra info in .dcm files).
Footprints on the other hand are .kicad_mod files in .pretty folders, that’s it.

To do it the (current) KiCAD way of having your own symbol lib you do the following (be aware that eeschema/pcbnew handle things differently, eeschema is old style, pcbnew is new style):

  • open the Symbol Editor
  • load an old symbol/start a fresh one
  • save the symbol in a new library as per screenshot

  • now back in EEschema open the component library setup dialog (which is really outdated and backwards)
  • add the path to the new library (by using the center list)
  • add the new library itself (by using the upper list)
  • move your library to the top of the pile, as currently if you got 2 different libraries with 2 times the same named symbol in there, EEschema will ALWAYS load the one from the lib that comes first in this list

That’s it.

Now, if you want this to be done for ALL new projects which you start in the future you have to do something manually and edit the kicad.pro project template file here (at least that’s how I do it, maybe @keruseykaryu chimes in if there is a GUI way):

C:\Program Files\KiCad\share\kicad\template

I only use my own local libs, so you would need to copy the content of your current projects symbol lib related stuff into that one. The area you want to focus on looks somewhat like this:

For footprints this is different and should be way easier with the footprint libraries wizard or the footprint libraries
manager (I prefer that one).
The manager does allow you to set up both project specific and global footprint sources for all projects you got and there is a way of using variables for paths, which makes your libs easier transferable if you need to.
But more on that when you need it, I think you will doing fine with footprint lib setup on your own.

Thank you very much, Joan_Sparky! I will try your procedure this weekend.

The GUI way is described in the KiCad Manager documentation - Chapter 2,2.

1 Like

I am in the same situation.

I found http://docs.kicad.org/stable/en/kicad.html#_use_kicad_manager
Is that the “KiCad Manager documentation”? If not, please provide a link.

Thank you.

That’s the part you want (under 2.2):
http://docs.kicad.org/stable/en/kicad.html#_initialization_of_the_default_configuration

Run KiCad and load kicad.pro project.

Run Eeschema via KiCad.
Modify and update the Eeschema configuration,
and mainly the list of libraries you want to use each
time you create new projects.

Run Pcbnew via KiCad.
Modify and update the Pcbnew configuration, especially the footprint library list.
Pcbnew will create or update a library list file called footprint library table.
There are 2 library list files (named fp-lib-table).
The first (located in the user home directory) is global for all projects.
The second, if it exists (located in the project directory) is specific to the project.

It boils down to opening the kicad.pro template file with KiCAD, doing all necessary adjustments to the paths via GUI means as I described above and then saving the all changes to the kicad.pro file via the 2 KiCAD tools AND also via the application launcher main window (save in eeschema, save in pcbnew, save project in KiCAD)

1 Like

Thanks Sparky.

Also helpful is Getting Started
6.2. Export, import and modify library components
6.1. Using Component Library Editor