kicad-cli: -D option didn't update text on board while exporting files
Description
Accroading to the document, -D option can be used to add or override project variable definitions
When I use this option while exporting gerber or STEP files, text including variable on board didn't change.
Steps to reproduce
- Create a text on PCB, with content
${SOME_VAR}
- use command like
kicad-cli pcb export gerbers -o out/ -D SOME_VAR=new_value ./pcb.kicad_pcb
- text value in exported gerber file isn't "new_value"
The exported text value is same as the value you see before closing pcbnew. If you didn't set up this variable in pcbnew, the text is just ${SOME_VAR}
; if you set up this variable before, the variable isn't overrided.
BUT, if you didn't set up this variable in pcbnew, it will produce a Unresolved text variable
DRC error. This error can be found both in DRC Check GUI in pcbnew, and cli interface using kicad-cli pcb drc
AND, if you add -D option for kicad-cli pcb drc
command, like this: kicad-cli pcb drc -D SOME_VAR=new_value --severity-error ./pcb.kicad_pcb
, the error disappeared.
It means, the cli interface is able to detect and set the project variable definitions, but the text content on board is not modified or refreshed
KiCad Version
Application: KiCad PCB Editor arm64 on arm64
Version: 8.0.0, release build
Libraries:
wxWidgets 3.2.4
FreeType 2.13.2
HarfBuzz 8.2.0
FontConfig 2.14.2
libcurl/8.4.0 (SecureTransport) LibreSSL/3.3.6 zlib/1.2.12 nghttp2/1.58.0
Platform: macOS Sonoma Version 14.3 (Build 23D56), 64 bit, Little endian, wxMac
Build Info:
Date: Feb 23 2024 14:47:16
wxWidgets: 3.2.4 (wchar_t,wx containers)
Boost: 1.82.0
OCC: 7.7.2
Curl: 7.87.0
ngspice: 42
Compiler: Clang 14.0.3 with C++ ABI 1002
Build settings:
kicad-cli version: docker image with tag 8.0.0