Hi all,
One of the many awesome improvements in version 6 was the introduction of variable substitution. This allows one to use a single source of truth for things like version number, name of the project, company information etc. However, I feel that something is missing for it to be used as a reliable source of truth. Here is an example.
I defined the following variables in PCBnew:
AUTHOR Mad Hatter
COMPANY Infinite Volatility
TITLE Obvious Error
VERSION 1.0.0
which I can then use to add the text field to the silkscreen as
${TITLE} ${VERSION}
${COMPANY} Ltd.
and also add to the title block info. These are all evaluated and rendered correctly, and inserted in the project file, and appear in the schematic file, too, so I can use them there.
However, if I copy the kicad_pcb file to another directory, and try to open it there, then some fields are not evaluated anymore, and instead of
Obvious Error 1.0.0
Infinite Volatility Ltd.
I get
${TITLE} 1.0.0
${COMPANY} Ltd.
I have checked the file, the variables are contained as
(property âAUTHORâ âMad Hatterâ)
(property âCOMPANYâ âInfinite Volatilityâ)
(property âTITLEâ âObvious Errorâ)
(property âVERSIONâ â1.0.0â)
and these are actually inserted both in the title block
(title_block
(title â${TITLE}â)
(date â2022-10-01â)
(rev â${VERSION}â)
(company â${COMPANY}â)
(comment 1 â${AUTHOR}â)
)
and in the silkscreen
(gr_text â${TITLE} ${VERSION}\n${COMPANY} Ltd.â (at 115 42.5) (layer âF.SilkSâ) (tstamp 0150a597-9ca4-4081-88d2-6ff7d09ea1a2)
but not evaluated. The evaluation works only, if the project file is available.
Some PCB houses support direct KiCAD uploads (they require only the layout, and not the whole project), in fact, Aisler has even a button for this in KiCAD, and I got suspicious after receiving multiple boards with the wrong text on the silkscreen.
I was wondering, whether this is a known issue, or whether there are workarounds, or perhaps, it has already been fixed in the meantime. I understand that the project file has to contain the information, for otherwise, variables couldnât be shared between the layout and the schematic. But I do think that one should be able to use the layout file without the project file, if interaction with the schematic is not required.
Application: KiCad PCB Editor
Version: 6.0.1-79c1e3a40b~116~ubuntu21.04.1, release build
Libraries:
wxWidgets 3.0.5
libcurl/7.74.0 OpenSSL/1.1.1j zlib/1.2.11 brotli/1.0.9 libidn2/2.3.0 libpsl/0.21.0 (+libidn2/2.3.0) libssh/0.9.5/openssl/zlib nghttp2/1.43.0 librtmp/2.3
Platform: Linux 5.11.0-49-generic x86_64, 64 bit, Little endian, wxGTK, cinnamon, x11
Build Info:
Date: Jan 15 2022 20:28:15
wxWidgets: 3.0.5 (wchar_t,wx containers,compatible with 2.8) GTK+ 3.24
Boost: 1.74.0
OCC: 7.5.2
Curl: 7.81.0
ngspice: 34
Compiler: GCC 10.3.0 with C++ ABI 1014
Build settings:
KICAD_USE_OCC=ON
KICAD_SPICE=ON