Env variable in Spice Model Library field?

I am trying to refer to a spice model using my project environment variable. Will EESchema pick up the simulation model?

Please see the picture to get a clearer idea of what I am trying,

Recently I bumped into some dead datasheet links from EEschema symbols.
I have a custom location for private copies of datasheets, and I wanted Eeschema to use those.

So I Invented a new Environment variable and named it:

KICAD_DATASHEET

and added it to:
Eeschema / Preferences / Configure Parths / [Add]
… And filled in name and value.

Now I can use ${KICAD_DATASHEET} in the datasheet field.
It seems that it needs to be an absolute path on my Linux box, but my datasheets don’t move around much, and KiCad remembers this environment variable between reboots.

There is a difference though.
The default datasheet links are opened in a web browser, while my custom links are opened in a pdf reader, but that’s ok with me

You may want to experiment with such a variaby to your “own_libraries” location.
(I do not know if it would work for Spice models.)

Well, the problem is with the simulation. When I run the simulation with NgSpice, EESchema cannot pick the model and complains that it cannot find the file.

It is not about a single individual maintaining an environment variable. What if the project needs to be versioned? Can these files be retrieved and “played” without much reconfiguration and a long README.md?

The FAQ on library management (Library management in KiCad version 5) indeed does not mention device libraries for ngspice simulation.

This probably is still open for discussion. I would suggest to add this to the library management system. However, due to licensing issues, KiCad would not distribute many library entries of its own. But it should provide a space and the management tools. The user then might fill this space by selecting the appropriate libs from e.g. semiconductor device makers.

Yeah. Licensing issues will exist

We are talking here only about resolving the file location when it contains some environment variables. Do Lib mgmt issues have a role to play here?

I used to use relative paths - for spice, relative to where the netlist generated, for datasheet it relative to where the symbol are, for 3d model, it relative to where the footprint are. This help me reduce the instruction of setting environment variables in the README.md… But not sure if this going the be continue supported!

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.