Project specific path variables

For my work I am switching between projects a lot. I would like to be able to make relative path variables on a per project basis. This is due to not always having the same map structure. As an example:

  • Project A
    • Lib
    • V0.1
      • v0.kicad_pro
    • V0.2
    • V1
  • Project B
    • Lib
    • PCB
      • V0.1
        • v0.kicad_prj
      • V0.2
      • V1
    • Wiring

When in project A the path variable for the Lib folder would be “${KIPRJMOD}/…/Lib/”, whereas in project B it would be ${KIPRJMOD}/…/…/Lib/".

I think a change to the configure paths dialog like below could solve/ improve this workflow.

I have no clue where else in the codebase needs to be changed to create this feature.

KiCad project files end in .kicad_pro not .kicad_prj.

Are you referring to symbol or footprint libraries? Both are already supported by project specific libraries.

Perhaps you might like to read the documentation to see how things work first.

Hi I the file extension is not the main topic of my post, but for your convenience i changed it to ,kicad_pro.

I am not referring to symbol or footprint libraries, i am referring to the environment variables you can create in the “configure paths” dialog

As far as i know there are no project specific environment variables.

You would have to submit a feature request arguing for its merits as an issue to the Gitlab repo of KiCad for it to be potentially considered for future versions.

Perhaps you can workaround this by another means, e.g. put a symbolic link to the desired directory in the project directory, e.g. lib -> ../lib and lib -> ../../lib in the two cases.

I do not understand what the problem is here. Best I know this is already supported.

I got confused by your screenshot. I do not recognize that dialog. Later I saw a “Mockup” popup text, I guess you drew it yourself in some graphical program. Correct?

Note: You have to put strings with two dots within backtics so this forum treats them as “literal text”. Else this forum software replaces two dots by a single character looking like three dots. It that *&^%$#@! unicode or whatever.

But overall, as I already wrote. It’s already implemented, and has been so for years.
I just tinkered a bit with: Project Manager / Preferences / Manage Symbol Libraries. To verify, I added a library from another directory with a relative path:

And I verified it works. When I open the schematic, I can now add symbols from the “Gerber_Reverse” library to this display_8x8 schematic.

1 Like