Skip to content

3D model not found in libraries from PCM due to "wrong" environment variable

Description

Libraries are downloaded from the PCM into the 3rdparty folder, which has an environment variable KICADn_3RD_PARTY. If the library is old or perhaps desires to be backwards compatible this environment variable will be for an old version of Kicad e.g. KICAD6_3RD_PARTY. According to the manual, this should automatically be sorted out, but it isn't.

99.9% sure the bug is here: https://gitlab.com/kicad/code/kicad/-/blob/master/common/common.cpp#L258 3RD_PARTY got missed. perhaps TEMPLATE ought to be included as well though not sure where that is used.

Steps to reproduce

  1. Install a library from the PCM. "Keyswitch Kicad Library" is one example
  2. Open footprint in footprint editor and open footprint properies. In the 3D models tab "File not found" can be seen.

Workaroundable by editing KICADn_3RD_PARTY to KICAD8_3RD_PARTY or by setting the old KICADn_3RD_PARTY environment variable to the same as the KICAD8 one.

KiCad Version

Application: KiCad x64 on x64

Version: 8.0.1, release build

Libraries:
	wxWidgets 3.2.4
	FreeType 2.12.1
	HarfBuzz 8.3.0
	FontConfig 2.14.2
	libcurl/8.5.0-DEV Schannel zlib/1.3

Platform: Windows 11 (build 22631), 64-bit edition, 64 bit, Little endian, wxMSW

Build Info:
	Date: Mar 15 2024 01:52:47
	wxWidgets: 3.2.4 (wchar_t,wx containers)
	Boost: 1.83.0
	OCC: 7.7.1
	Curl: 8.5.0-DEV
	ngspice: 42
	Compiler: Visual C++ 1936 without C++ ABI

Build settings: