Moving symbol(s) between libraries

I have never tried to do this out of fear so I need some advice

I would like to move symbol(s) from one library to another.

From x.lib to y.lib

How will my schematics using the moved symbol react to this ?
Is there a good way to do this ?

Another related question, renaming a library ?

1 Like

You can open a symbol in the editor and save it to another library from there. It sounds clumsy but if you are doing it as you go along it isnā€™t too bad. If symbols have the same name then the first occurrence in the search list is used. Some of us have personal libraries that we move to the top of the search list just for this reason.

The files are text based so you can actually go in and do copy and paste from one lib to another also.

If you rename a library you must be sure it is added or shows up in the list.

1 Like

Ok so as long it shows up in any lib in the search list I should be fine.

That was way much easier than anticipated , thanks

Lets assume you want to move Symbol a from lib A to lib B

  1. Open the symbol editor.
  2. Set lib A as active.
  3. Load symbol a.
  4. Set lib B as active.
  5. Update symbol a for lib B.
  6. Save lib to disc.
  7. Set lib A as active again.
  8. Delete symbol a from lib A.
  9. Save lib A to disc

Deleting the symbol might be possible before you save it in lib B but this sounds a bit risky to me.

1 Like

Here is a pretty easy way to create your own lib.
It looks like a lot of steps, but the steps are very small and reasonably intuitive after you have done it a few times.
I work under Linux and all the default libraries are read-only. I can not even change them if I tried (as a user).

1). Open KiCad.
2). File -> New Project -> New Project [Ctrl N] -> Click LMB.
3). Name your project ā€œasdfā€ (as example). & save it.
4). Open EEschem and add all kind of symbols from different libraries.
5). Save & Exit.
6). In your project directory you will find a file ā€œasdf-cache.libā€
7). Rename that file to ā€œasdf.libā€
8). Restart Kicad and go to EEschem.
9). You will still see your schematic symbols, but they are taken from the original libs.
10). EEschem -> Preferences -> component Libraries -> Insert -> asdf.lib -> Open.
11). Make sure that your asdf.lib is on the top of the list of ā€œComponent library filesā€.

After you close & Re-open Kicad / EEschem the components will first be read from ā€œasdf.libā€ because that lib is on top of the list of ā€œComponent library filesā€.

This will be a lot more clear if the symbols in your own lib look different from the symbols in the default libraries. So now we are going to change a symbol in your own lib.
12). Move your mouse over a symbol and press [Ctrl + e].
13). That part is now being opened in the ā€œPart Library Editorā€
14). The Title bar should read ā€œPart Library Editor: //any/path/asdf.libā€
15). You can edit anything you like on this component in your own library.
16). When you are finished press: File -> Save Current Library [Ctrl +s] -> Yes -> Yes.
17). Close the library editor.
18). At this point you still see the old component in EEschem.
19). But as soon as you zoom in/out the screen is redrawn and you see the new symbol.

You can copy or move this file to anywhere you like, but if you want to use the components in that library you will have to add it to those projects with:
EEschem -> Preferences -> Component Libraries
And then add the path to the search path and also add the lib itself to the top of the list in ā€œComponent library filesā€.

====================
Edit:
This mini tutorial is pretty similar to Reneā€™s except that it is longer because it uses EEschem as an intermediate step.
When I was new with KiCad I had a lot of trouble in changing a library component (Maybe it was buggy back then). But also:
1). Open KiCad -> EEschem.
2). press ā€˜aā€™ and add a component from any of the default libraries.
3). Put your mouse cursor on the middle (approx) of the component and press [Ctrl +e].
4). The ā€œPart Library Editorā€ is opened again.
5). In the title bar you see "Part Library Editor:/usr/share/kicad/library/74xx.lib [Read Only]
6). See, default libraries can not be written to :slight_smile:
7). File -> Current Library -> asdf -> OK.

The title in the ā€œPart Library Editorā€ has now changed to you asdf lib and the [Read Only] mark has vanished, and you can save that component in your own lib now.

1 Like

I did rename a lib by simply renaming the lib file on disc.

I then deleted the old lib-name in lib-manager and added the renamed file (same exact file but renamed) .

Fine i thought, but all descriptions disappeared.
All components still there but descriptions is just blank.

Why is that ?

you need to do the same with the dcm file (descriptions, keywords and datasheet links are part of the dcm file.)
Everything in the dcm file exists per alias, everything in the lib file exists per symbol and can not be different for aliases.

1 Like

ooohhh

a bit illogical to split the description from everything else.

I was not ready for that one.

Thanks for quick help.

Who said the current lib format is logical?
There is a reason it will be replaced in a future kicad version. (Sadly the new format might not be ready for v5. It looks like we will have to wait for that.)

1 Like