When adding Project Specific Libraries and 3D models, the custom path isn't being used, instead it's hard coding the path to the files.
Steps to reproduce
Add a custom path to the project, in my case it's ${DDRAIGLIB} pointing to "C:\Dev\KiCAD\Ddraig68K\ddraig-libs"
Create a new project, and go to Manage Symbol Libraries and go to Project Specific Libraries and browse for existing library
When added to the project, the full path to the library is displayed, not the expected ${DDRAIGLIB}\ddraig.lib. This used to be detected correctly in KiCAD 5.
KiCad Version
Application: KiCad (64-bit)Version: (6.0.0), release buildLibraries: wxWidgets 3.1.5 libcurl/7.78.0-DEV Schannel zlib/1.2.11Platform: Windows 10 (build 19044), 64-bit edition, 64 bit, Little endian, wxMSWBuild Info: Date: Dec 24 2021 19:17:02 wxWidgets: 3.1.5 (wchar_t,wx containers) Boost: 1.76.0 OCC: 7.5.0 Curl: 7.78.0-DEV ngspice: 35 Compiler: Visual C++ 1929 without C++ ABIBuild settings: KICAD_USE_OCC=ON KICAD_SPICE=ON
Designs
Child items ...
Show closed items
Linked items 0
Link issues together to show that they're related or that one is blocking others.
Learn more.
Just one question for my understanding: the directory-path should be automatically replaced by the defined path-variable? I have manually replaced the leading directory-path against my "KICAD6_USER_LIBRARY_SYMBOL"-variable for a long time. If this is a bug and you need a description say something and I will deliver my working-steps.
ok, these are my steps to add a new entry to the symbol libraries table. I have not seen any automatic path-replacement the whole time I tried/used Kicad (5..6 months, always v5.99/v6).
start kicad, open any project, open schematic, open Preferences->Manage Symbol libraries table
scroll symbol-libraries-dialog down to the end --> picture1
click button PLUS, new empty row is displayed, column "Nickname" has focus: type 00_buglibrary (picture2)
click with single LMB-click into column "library path", the cell goes white, on the right end appears a directory-search-icon (picture3)
click with single LMB-click onto directory-icon. Windows-file-explorer opens. Navigate to file and select with doubleclick. Windows-file-explorer closes, file-name with complete path is inserted into cell "library path". No automatic path-replacement is happening. (picture4)
close "symbol libraries"-dialog with "OK"-button. At this point the newly added library can be succesful used in eeschema/symbol-editor.
now closing Kicad / reopen Kicad and reopen the "Preferences->Manage Symbol libraries table"-dialog: there is an interesting change regarding the direction of slash/backslash:
directly after the file-selection (pic4) the directorypath-delimiter is backslash, after reloading kicad all path-delimiters are changed to normal slash (picture5)
version: (6.0.0-rc2-14-ga17a58203b) on windows10 64bit
I cannot duplicate this on either the HEAD of the 6.0 branch or the HEAD of the master branch. I even tried manually add the trailing back slash which doesn't get added when you use the folder select dialog to set the environment variable but still no luck. I notice the version tested is 6.0.0-rc2-14-ga17a5820. Would you please install 6.0.1 and see if you can still trigger this issue?
tested with Version: (6.0.1), release build and also with nightly Version: (6.99.0-554-gd5a2059c21), release build.
As I said this behaviour goes back as long as I can think (I started using Kicad last summer and since that time I have never seen any automatic path-substitution).
additional research: the "automatic path-substitution" works with libraries inside the project-directory. The path is substituted with the automatic-path-variable ${KIPRJMOD}. At least I have seen this feature alive.
I did not use a path inside any project or any library path created by the KiCad installer. I use a path completely outside any know environment variable I had configured on my system. There must be something else we are missing. Is it possible it's configuration related?
Sorry, been very busy, not had a chance to record a video of the problem.
@mf_ibfeew says it works within projects project directories and he may be onto something. My project is a folder with the library path as a sub directory and designs in sub folders of the project directory.
I have invested some time and for my case I think I have found the reason for the not-working path-substitution:
I have always written the path+directory manually at the "configure path"-dialog
mostly I used copy/past from my filemanager (to be precise: windows total-commander)
this leads to a lower-case/upper-case - problem: the copied directory-path starts with a lower "c:" whereas all later selected libraries start with upper-case "C:"
this can be seen on picture5 from above (I have attached an cutout)
so in general the substitution-algorithm seems to be case-sensitiv (on windows this is not necessary, filenames/directorys must have more differences than lowercase/uppercase. But I could not speak for Linux/Macos.)
solution for me:
all directory-strings in "Preference-->Configure Path" repaired (replaced c:\ with C:)
for future: always use the Kicad-builtin-fileselector / directory-selector. The bultin-functions handle the lower/uppercase-problem consistent and so the path-substitution works.
@SteveMoody : could there be a similar writing-problem on your project?