Schematic Library Path Relative To Project Folder

Hi, I would like to configure paths to custom schematic symbol libraries that are in my project folder, so that I can share them easily over git without having to manage multiple repos. I would like to do something like:

{ProjectFolder}/CustomSymbols/myCustomLib

under library path in the schematic library tables.

How can I do this? I am using the Windows nightly build.

${KIPRJMOD}/CustomSymbols/myCustomLib

1 Like

${KIPRJMOD}/CustomSymbols/myCustomLib

Exactly what I was looking for. Thanks!

In order to send my projects to other people I keep my libraries this way:
${KIPRJMOD}/libraries/Modules3D

So far, so good.

This approach requires one Modules3D folder per project.

So I’m trying without any success to have the libraries folder at the same directory level of the project folder:
${KIPRJMOD}/…/libraries/Modules3D
This way some projects would share the same libraries without changing the footprint 3D paths.

It seems /…/ doesn’t work yet. I thought it would be possible in version 5, but so far it isn’t.

Has someone a workaround to achieve it?

Unfortunately, I believe the ability to use relative paths with “…” was removed, I don’t think there is a plan to put it back in.

I don’t think there is a real workaround, the closest I know is to define something like MYLIBDIR and use that. The drawback is it has to be defined by everyone who receives the project, so there has to be some “installation” instructions.

Thanks, Bob.
In fact what I want to avoid are the installation instructions.

Where does that information come from? I have used it in the past. Now I’m trying to test it, and it seems to work: I add the relative path, exit kicad and reopen it. The path is saved and loaded identically in the relative form. This happens on Windows with the latest nightly build. This is the saved sym-lib-table:

(sym_lib_table
  (lib (name xxx)(type Legacy)(uri ${KIPRJMOD}/../Components/symbols/xxx.lib)(options "")(descr ""))
)
2 Likes

Thanks @eelik

I don’t know what I was doing wrong. The paths in the kicad_common file were right, as you are showing.
But the 3D models were not loaded in the 3d viewer. Maybe it was a typo on my side at the 3D shape name.

I’m using linux kubuntu nightly. Thanks again.

1 Like