Looking more into this, I found this thread from 2019 that mentions exactly this use of a _DATASHEET environment variable… $(KICAD_DATASHEET_DIR) proposal - #11 by paulvdh
I just tried this in the project that I am working on now, and I set up my symbol like this …
Now pressing ‘d’ on this symbol in the schematic editor immediately opens my local copy of the datasheet. This is wonderful!
However, I tried setting the symbol datasheet field like this, and strangely, it did not work…
${KICAD_USER_DATASHEET_DIR}/${VALUE}/${VALUE}.pdf
I would expect it would have expanded to this…
${KICAD_USER_DATASHEET_DIR}/TI-BQ25171/TI-BQ25171.pdf
The ${VALUE} replacement token is mentioned here…
This would have been nice so I could simply regex my symbol library files and never have to set the datasheet field ever again.
