How to view actual library path for symbol/footprint in KiCad UI?

It is quite a long story, and it explains the origin of your confusion, but for the most part it is not very relevant for the path names. For example, the troubles with 3D models are not related to the symbols.

What KiCad does:

  • Every symbol in the schematic has a [Lib Nickname] / [Symbol Name] combination.
  • The [Library Nickname] can be either a global or project specific library.(Project specific library overrides (and hides) nicknames in the global library table).
  • The Nickname can be different from the library name.
  • Nickname is expanded to a full library path.
  • Full library path is built upon environment variables.
  • There can be automatic translation between KICAD6_3DMODEL_DIR and KICAD7_3DMODEL_DIR. I do not know whether KiCad also does something similar with KICAD6_SYMBOL_DIR (and/or for footprints).

Did I miss something in that summary?

There is enough translation going on that having the ability to quickly and unambiguously identify the origin of a schematic symbol can help with troubleshooting. Especially that a nickname in the project’s library table can overrule a global library can be confusing. (Consider open source projects here, where someone modifying it often knows very little about the origins of a project).
I guess this is worth a feature request.

1 Like

Thanks for your comment.

I agree that the 3D models issue is not related to the symbols library per se. However it IS related to the footprint libraries and the path variables and nick names by which they are found.

The title of my original post included both symbol and footprint as the target of my question, given that the library path variable mechanisms for both types of object are quite parallel, with equivalent tables, nicknames etc.

Regarding your description of the [Lib Nickname] / [Symbol Name] mechanism – I would add a couple of additional points:

What Kicad calls “Environment Variables” are actually not “Environment Variables” in the normal sense of Operating System or session environment variables. Instead they are variables internal to Kicad, and stored in a file somewhere. However, those internal variables CAN be overridden by actual environment variables of the same name, if set.
So that’s a potential extra source of confusion – an OS environment environment variable that’s set when you didn’t expect it, or the reverse, you set an OS environment variable, but for some reason Kicad doesn’t see it – perhaps a spelling mistake.

I should also point out that the user is free to add their own variables to the Configure Paths “Environment Variables” list. I find this quite a useful feature. But it’s a further opportunity for a variable to not to work as expected.

By the way, I have no beef with Kicad’s path scheme per se – it’s pretty straightforward with about the right amount of indirection for my purposes. My only wish is for a completely unambiguous way to see the actual path that Kicad calculated for a particular symbol on a schematic or footprint on a PCB. That would be helpful.

Isn’t that already deprecated or planned to be?

On this one point, I wouldn’t expect there to be behind the scenes translation for those variables, because I don’t think any other files (previously created in K6) refer to symbols or footprints or their libraries by file path.

The situation with 3D models is unique in that the footprint library file refers to a 3D model file using the 3D model’s directory, which is simplified by using an environment variable in that path. So footprint files brought over from K6 contain the variable " KICAD6_3DMODEL_DIR", and those would all need to be changed in both the Kicad-supplied and user’s local libraries.

In contrast, when a symbol library refers to a footprint, it uses the nickname to do so, avoiding use of the file path, and thus no need for an environment variable.

The irregularity here is that there is no 3D model manager and table of nicknames for the 3d model libraries, that would parallel the symbol manager and table, and the footprint manager and table. Hence the 3d footprints don’t have nicknames, and so footprint files’ references to them have to resort to file path, simplified by at least using the KICAD6_3DMODEL_DIR environment variable.

At least, that’s what I infer.

I don’t know anything about that, and I rather hope not, because as I mentioned, I use it.

If interested, I define the following:

K7LOCAL_USER_SYMBOLS
K7LOCAL_USER_FOOTPRINTS
K7LOCAL_USER_3DMODELS
K7LOCAL_USER_PROJECTS
K7LOCAL_USER_SCRIPTS

and assign to then the folders where I want to put these local libraries. Then I can use these variables where needed (such as in Symbol Manager’s table and Footprint Manager’s table).

I don’t recall where or if I’ve used the other variables, but a minor point is that it’s convenient to have them recorded in the Configure Paths, alongside the KICAD7_xxx variables.

I will have to keep an eye on the fate of these user-defined variables in case I need to devise a different strategy for K8.

I meant the environment variables defined in the OS execution environment, e.g. the Linux shell.

1 Like

I meant the environment variables defined in the OS execution environment,

Ah, OK, good to know.

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