Suggested User Library Best Practices V6

I am migrating to a new laptop with a fresh install of KiCad 6.0 on Windows 11. It has been while since I have looked at this, and wanted feedback on what is recommended as the best practices for setting up local User Libraries under v6.0. Some assumptions:

  • All our Kicad projects only use parts from our User Lib. Parts from the Kicad Libs are copied to the User Lib so future changes to the Kicad Libs don’t trickle into production boards without review. Also, tweaks are made to Fab and REF** formatting to meet our needs.

  • There only exists a single schematic, footprint, and 3D library (folder). Parts are not broken down into any further sub-categories.

Currently(starting back with KiCad v4.x), the User Library of all our parts (symbols, footprints, & 3D) have been kept in:

C:\Kicad\CompanyName
…\library
…\modules
…\packages3d
…\Templates\

Looking at the V6.0 Install, I see there is a C:\Users\username\Documents\KiCad\6.0\ folder containing empty \symbols, \footprints, and \3dmodels folders. Two questions:

  1. Is this the recommended location for User Libraries?
  2. What is the best setup for handing projects and libraries between multiple developers?

Previously, our libraries were in the base C:\ path so that the library paths were the same for multiple developers working on the same project. Note that our Kicad Projects and Libraries are both in Git source control. Also assume that only one person works on and modifies a Lib or Project at a time.

Thanks everyone,
Aaron

The 3rdparty folder (${KICAD6_3RD_PARTY}) is populated by PCM with addons; don’t know about the others.

1 Like

It’s just a location which is commonly used for user data on Windows. Many users have application specific files under user Documents. Whether you call it a “recommendation” is a matter of taste. KiCad doesn’t really care, but it was chosen as the most sensible and “standard” default on Windows.

Whatever works for you. Different companies have different standards for shared files. KiCad doesn’t really care. Sometimes there have been problems with some network shares (which have been fixed in KiCad), but if you need to share files they must be shared anyway.

1 Like

@eelik Thanks. Do you know if there is an equivalent user directory structure on Linux and MacOS? It will be a couple of days before I could test this.

On Linux, ~/.local/share/kicad/ is created automatically by KiCad and corresponds to the user’s Documents\KiCad\ folder on Windows.

It’s perfectly OK to continue with that.

I decided to stick with our separate folder setup, as using the Kicad user folders with Git didn’t look like a good idea moving forward. I did made some tweaks for those interested. Here is my new setup:

  • user_choice_base_folder_location\Kicad\CompanyName\

  • Updated subfolders to match Kicad V6 structure:
    …\Kicad\CompanyName\symbols
    …\Kicad\CompanyName\footprints
    …\Kicad\CompanyName\3dmodels
    …\Kicad\CompanyName\templates

  • Created/Updated Kicad Environmental Variables to point to the above:
    KICAD_USER_SYMBOL_DIR
    KICAD_USER_FOOTPRINT_DIR
    KICAD_USER_3DMODEL_DIR
    KICAD_USER_TEMPLATE_DIR

  • Updated all my project’s .kicad_pcb files to change the hardcoded 3d model paths to ${KICAD_USER_3DMODEL_DIR} – (this was the biggest pain, but sed to the rescue):

find . -type f -name “*.kicad_pcb” -exec sed -i ‘s/C:/KiCAD/CompanyName/packages3d/${KICAD_USER_3DMODEL_DIR}/g’ {} +

  • Added the Symbol file and footprints folders to the Global libraries

Moving forward, a new developer would only need to setup the following to work on shared projects in Git:

  1. Pull the Git Library Repository to whatever location they prefer
  2. Update KICAD_USER_SYMBOL_DIR, KICAD_USER_FOOTPRINT_DIR, KICAD_USER_3DMODEL_DIR, & KICAD_USER_TEMPLATE_DIR to match the local location
  3. Add the Symbol file and Footprints folders to the Global libraries
1 Like