I’m intending to switch over from years of Eagle use to KiCad 6. I’ve successfully entered schematic and am laying out a PCB. Starting a second board raised these issues below. I looked through the help, preferences, and the FAQ on the forum and found nothing that addresses how folders, projects, libraries are managed.
KiCad6 creates per-project folders in ~/Documents (MacOS), for schematic, board, symbols, etc. My one custom library, so far, is also placed here. This isn’t a viable schema for me, with many projects and shared, common libraries.
Can I create an overarching “kicad projects folder” and place/create projects there? eg. ~/Documents/KiCad-Projects.
Can I place a/the library I am creating at some higher level folder, common to all projects? eg. ~/Documents/KiCad-Libraries.
I see the ‘configure paths’ data for symbols and footprints, but they’re up in the Applications folder, not a place I would want to put custom libraries, and there’s only one each. Are there additional per-user and per-project configurable paths?
I do not use the fruit brand of OS myself, but configuring KiCad is very similar regardless of your taste of OS.
You can use the Configure Paths to create a custom environment variable, and make it point to any location you like (KiCad has problems with NAS shares, any local path should work though). You can create a new variable by clicking on the plus in the lower left corner.
After you have made your custom variable, you can use it in path names of your personal libraries, in the same way as KiCad uses other environment variables.
Ahh, thanks! I hadn’t noticed that it’s environment vars, that helps.
OK that solved it. Sorta-kinda copied the Arduino setup, a directory that contains per-project folders and a folder named “Libraries” that contains symbols and footprints etc.
I have a single kicad directory with my lib stuff, projects for v6 (which will be archived soon), projects for the upcoming v7 stuff, like this:
~/kicad/mylib
~/kicad/mylib/3dmodels
~/kicad/mylib/database
~/kicad/mylib/footprints
~/kicad/mylib/symbols
~/kicad/projects-v6
~/kicad/projects-v6/project1…
~/kicad/projects-v7
~/kicad/projects-v7/nutherproject…
I simply use Preferences/Manage-Symbol-Libraries to add my .kicad_sym lib and turn off the others. Likewise, I use Preferences/Manage-Footprint-Libraries to add my footprint folder and turn off the others. The 3d models are linked in each footprint file. The database is a new and fun work in progress.
Edit:
Forget about the text below, read eelik’s response, I’m not too wel versed in KiCad’s internal workings.
I’m not sure about the details of these environment variables.
I guess you can also use environment variables directly in your OS, and then let your OS do the substitution, but I have not tried it. For me, keeping them locally in KiCad “works”.
I’m not 100% certain about what you mean, but I don’t think that’s the case. It’s possible to define normal environment variables in the underlying system and KiCad recognizes them, but KiCad still does the substitution. The system variable names/values can’t be seen through KiCad, for example in the Configure Paths dialog or Manage xxx Libraries dialogs, but they can be used for substitution using the ${} syntax.
If you use the same variable name in the Configure Paths dialog, the value you define in KiCad will be overriden by the value defined in the system. This caused problems after installing v4 because the KiCad Windows installer wrote the system variables by default. That was changed for the later installers, and nowadays it’s not possible to set OS variables with the installer.
In short, never use OS variables for KiCad unless you know what you are doing and why.
To add to this: a user application should never be allowed to set OS path variables. Think of the chaos that could cause.
The KiCAD path substitutions are only internal (AFAIK, I’ve never seen them pop up elsewhere) and as such exemplary.