How to embed Library Parts in a Project?

After creating a schematic, the .pro and .sch files only have pointers to the existing libraries.
But libraries change…

How can I embed the library parts into the design files to make the design permanent? Do I have to copy the parts to a “Project” library instead of just using the “Global” or is there another way to integrate the parts into the design files?

Thank You.

I just did:

paul@medion:~$ mkdir asdf
paul@medion:~$ cd asdf
paul@medion:~/asdf$ cp /usr/share/kicad/template/
paul@medion:~/asdf$ cp /usr/share/kicad/template/fp-lib-table .
paul@medion:~/asdf$ cp …/projects/kicad/mumar_base_stm32/sym-lib-table .
paul@medion:~/asdf$ kicad ./

The Idea is that during normal project initialisation it’s probably just some copying / renaming of files.
“sym-lib-table” holds entries for project specific libraries, and I did not see that immediately in the “template” library, so I copied it from another project.

Then starting KiCad with that project created from the commandline It does indeed add the project specific libraries from that other project to the “asdf” project. The schematic and pcb files are created at the first attempt to open them.

Another possibility is to look into creating custom templates:
KiCad / Help / KiCad Manual Chapter: 4 Templates.

This is a very crude and incomplete answer, because I have not much experience in this regard, and don’t want to spend too much time on it, but it should be enough to give you some pointers and fill in the details yourself.

All details for kicad version 5 and older: Project and libary setup for sharing and collaboration (Explains the tradeoffs involved.)

I use the “archive project” plugin from Mitja, I does all the copying and repointing automatically for you (great stuff!).

1 Like

Somehow my question was imprecise it seems.

I’m not talking about “sharing and collaboration”

I’m talking about storing the component library files (.lib and .dcm) together with the design files (.pro, .sch and .pcb)

As an example: I have a design where I need alternate shapes for the schematic (aka “DeMorgan” in KiCAD speech). For these I’ve created my own local library components (as they don’t exist in the main library).

But if this local library disappears/isn’t restored/whatever, the schematic is populated with empty spaces and lines.

To avoid having to rebuild the schematic every time a library is changed or no longer available, I’d like to store all the relevant library components together with the .pro/.sch/.pcb files.

Is there an option to do this?

The “*-rescue.lib and *-rescue.dcm” files seem to be an attempt to solve this, but are not really satisfactory as solution.

Making a project standalone would be the solution, not only to sharing and collaboration problem, but this, too.

One solution is already in the development version: the new file format for the schematic which embeds the symbols. Each symbol is actually saved in the schematic file. They can’t get lost by accident, unlike the cache file (not the rescue file which is a different thing!).

1 Like

The “standalone project” development sounds very encouraging, and seems to answer my other question: at this point it’s not possible, right?
(Unless I manually export every component to the project directory).

I’ve made a few of my projects “standalone” mostly by removing the “-resque” part of the filename, and also with a search and replace operation in the schematic.

For a more robust way of doing this, the “KiCad Action Plugins” script is probably a better starting point.

This is how it works now in KiCad V5.
KiCad V6 will have a new schematics format, and the schematic symbols will (probably?) be embedded in the schematic itself in the same (or similar) way that copies of the Footprints are now embedded in the pcb file.

1 Like

Right, but as was already said, the archive plugin should do the manual work for you with v5.1.

1 Like

@eelik and @paulvdh:

Thank You for very helpful and competent answers.

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