Any way to omit global libs in a specific project?

Is there any way to configure a project so it only uses project-specific footprint libraries, and does not use global footprint libraries?

I would like to use the backported libraries in 4.0.7 on new projects I start, but not change the global fp-lib-table in a way that would interfere with projects I’ve already started.

I think this is doable for symbol libraries, because the .pro file contains all the libraries used, so I can just remove all the old ones and add the new ones.

But for footprint libraries, I’m not sure how to get the result I want. I can add the new libraries to the project’s local fp-lib-table, but then I will get both the old and the new libraries showing up (e. g. in CvPCB). Is there any way to configure a project not to use the global fp-lib-table?

Footprints include the library name, so you can edit a footprint in the pcb and save it to a local library.
4.0.7 is more fiddly for schematic as v4 schematic does not understand libraries and will load the first instance of the symbol name it finds

Sure, but how does that help achieve my goal of wanting only the backported libs to show up in CvPCB?

But I don’t think there’s any issue for schematic symbols, because all of the libraries are listed in the .pro file. I can just remove the old ones and start with a clean slate.

I fear there is really no good way to achieve this. The only thing that comes to mind is writing a custom kicad starting script that exchanges the fp-lib-table depending on which libraries you want to use.

2 Likes

If you happen to use some Linux distro you should be able to use XDG_CONFIG_HOME environment variable and start kicad from scratch. The upcoming version 5 recognizes that and KICAD_CONFIG_HOME on all platforms, but v4 unfortunately doesn’t, so this option is limited to *nix systems. Then, if the global fp-lib-table is not what you want you can change it without affecting other projects which you start with the old configuration. See Any ultimate Guide on how to use KiCad 4 and 5 on one System? and the document I link from there for details about using environment variables.

1 Like

Unfortunately, I’m using Mac OS X.

Well, technically Mac OS X is a UNIX system…

Forget about that XDG_CONFIG_HOME variable. You can use KICAD_CONFIG_HOME for KiCad 5, and that’s fine.

Unfortunately KiCad allway looks at the globally defined fp-lib-table. I was also thinking about a way to make a project “selfcontained”. When I had a look at eeshow (awesome git diff tool for KiCad schematics), I noticed, that this breaks, if something in the library setup has changed since the project was started.

What exactly do you mean by back ported V4.0.7 libs? I have set up some Git repos for lib v4, similar to the structure of lib v5 on Github: https://github.com/KarlZeilhofer (look for kicad4-*)
These libs use different environment variables, to not conflict with KiCad 5.

If you do not mind the “library pollution”, you can use some prefix for your “new” libs in your new projects in the local fp-lib-table. Then you will see all the libs: the old global libs and the new local libs.
You may also have a look into that python tool for diagnosis of your project: https://github.com/KarlZeilhofer/kicad-models-updater

I think you and me have similar aims: using old projects without remapping them to work with KiCad 5. KiCad 4 projects should still be KiCad 4 projects. For new Projects I will start with KiCad 5. We did some restructuring our libs for lib v4, which needs some porting efforts on v4 projects, but that seems to be worth the efforts.

Greets, Karl

But the point here was to use KiCad 4.0.7…

That’s what I was trying to avoid.

Renaming the backported libs would defeat the purpose of being ready for v5. But the v5 libraries generally already have different names than the v4 libraries (singular instead of plural).

Sure, that is my fallback option, which I guess I will have to do. It just means I have to wade through the v4 libraries in CvPCB and pick out the v5 libraries. Inconvenient, but not a show-stopper.

Sorry, didn’t get that point :slight_smile:

Another idea would be to remove the global fp-lib-table completely and use only local ones. This would be fine with new projects. For existing old projects you would have to copy only that global fp-lib-table into your project, or merge it, if there already exists one.

1 Like

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