Skip to content

Project text variable not resolved in pcbnew standalone

Note: Perhaps this is rather a feature request than a bug report, but apparently I can't create the former.

Project text variables are not resolved if the *.kicad_pcb file is opened stand-alone.

Use Case

I like to use a project text variable REVISION that I use everywhere, in the sheet frame as well as on the silkscreen. This works great as long as I have the complete KiCad-project opened including the *.kicad_pro file.

I sent only the *.kicad_pcb file to a board house for production, my board came back with literally ${REVISION} printed on the silkscreen. If I open the *.kicad_pcb file with pcbnew (standalone) I get the same result, the variable is not resolved.

By peeking inside the *.kicad_pcb file with a text editor, I found the line (property "REVISION" "1.1") so it seems that the value of the variable is contained.

Proposed Behaviour

As far as I understand the project text variables are stored inside the *.kicad_pro file. If the variables are also stored in the *.kicad_pcb file, then the variable could be updated in the pcb when the complete project is open. If only the pcb is open and the *.kicad_pro is not present, the variable stored in the pcb file is used as fallback.

Steps to reproduce

  1. Create Text Variable
  2. Use Text variable e.g. in PCB as text on silkscreen
  3. Save Project, Close it.
  4. Open pcb file in stand-alone mode or copy it somewhere else and open it there.
  5. The text variable is not resolved.

KiCad Version

Application: KiCad

Version: 6.0.7-f9a2dced07~116~ubuntu20.04.1, release build

Libraries:
	wxWidgets 3.0.4
	libcurl/7.68.0 OpenSSL/1.1.1f zlib/1.2.11 brotli/1.0.7 libidn2/2.2.0 libpsl/0.21.0 (+libidn2/2.2.0) libssh/0.9.3/openssl/zlib nghttp2/1.40.0 librtmp/2.3

Platform: Linux 5.13.0-41-generic x86_64, 64 bit, Little endian, wxGTK, plasma, x11

Build Info:
	Date: Jul 26 2022 19:32:41
	wxWidgets: 3.0.4 (wchar_t,wx containers,compatible with 2.8) GTK+ 3.24
	Boost: 1.71.0
	OCC: 7.5.2
	Curl: 7.84.0
	ngspice: 36
	Compiler: GCC 9.4.0 with C++ ABI 1013

Build settings:
	KICAD_USE_OCC=ON
	KICAD_SPICE=ON
Edited by KiCad Bot