A pitfall in footprint libraries

I’m not an expert, I use KiCad occasionally as an amateur electronics enthusiast, and I’ve just updated to v5, Windows 10.
I’ve made a new, project-specific footprint and saved it in my Users//Documents/KiCad/Projects/Lib_Schematics.pretty library. All worked fine, I can see the footprint and link it to the component in Assign Footprints, and save the netlist.
The next time I opened Assign Footprints I received an error message:
“Footprint library path does not exist.” I checked. it does exist, and the path is still present in the Footprint Libraries dialogue.
I added the path again, and it started working.
The Solution.
The first time I appended the path I used Windows copy and paste from an explorer browse window (i.e. the full path: c:\users\colin…etc)
The second time I used the KiCad browse box which created the path as: ${KIPRJMOD}/Lib_footprint.pretty . Only the second method survived a computer reboot.

1 Like

Which branch of the v5 series are you running: 5.0.x, or 5.1.0?

This might be a bug. At the least, the documentation should have a warning that fully-qualified paths are not supported - paths must be relative to one of the KiCAD base paths.

Would some regular user please confirm:

  • Whether this behavior is reproducible on version 5.1.0?

  • Whether this behavior is intentional, an unavoidable artifact of some other feature, or a bug?

Dale

Paths in the library tables can point to any location on the file system as long as they are given in a valid format (the example above does not start at the root of the file tree. It either is missing c:/… or /…, it might be a valid relative path but only if the directory the project is in has a subdirectory User which i doubt to be the case.)

Why do i know this? Well i have 4 different versions of the official libs setup on my pc. None of them are in kicad paths.

Hi Dale, The version is “(5.0.2)-1, release build.”
I used the full text path (c:\users<name> etc) because the footprint wasn’t visible, I couldn’t find where KIPRJMOD is set, and I thought it might still be pointing to my previous project.
I did notice that copy and paste from windows gives backslashes in the path, whereas the KiCad browse box gives forward slashes.
Colin

Rene, The path in my post was incomplete, it did start from C:. Apologies for the incomplete post and sending you on a wild goose chase.

this variable is an automatic variable that always points to the current project. Meaning it only makes sense to use it in project local library tables (and project local footprints for pointing to project local 3d models.)

I understand; so it is set when I open the Kicad manager or if I select a different project.

Thanks for letting me know,

Colin

You don’t really need to care when exactly it is set. Just know that it always points to the project directory when it matters. (At the time kicad reads the library table files or when creating a 3d view.)

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