to the eeschema circuit diagram. A ngspice command may be preceded by pre_ . Then it is run before the circuit is parsed. The code model is loaded, then the circuit is loaded into the matrix and the simulation runs successfully.
Application: Eeschema
Version: (5.99.0-192-g5933ac3b9), debug build
Libraries:
wxWidgets 3.0.4
libcurl/7.54.0 LibreSSL/2.6.5 zlib/1.2.11 nghttp2/1.24.1
Platform: Mac OS X (Darwin 18.7.0 x86_64), 64 bit, Little endian, wxMac
Build Info:
Build date: Oct 2 2019 10:19:28
wxWidgets: 3.0.4 (wchar_t,STL containers,compatible with 2.8)
Boost: 1.69.0
OpenCASCADE Community Edition: 6.9.1
Curl: 7.54.0
Compiler: Clang 9.0.0 with C++ ABI 1002
When run from KiCad in my setup (double click onto KiCad/kicad.app alias), code model spice2poly.cm is found, simulation is o.k..
When run from Eeschema in my setup (double click onto KiCad/eeschema.app alias), code model spice2poly.cm is not found.
May I suggest that we add another search path "../Plugins/ sim/ngspice" to eeschema/ sim/ngspice. cpp, line 447:
#ifdef __WXMAC__
"/Applications /ngspice/ lib/ngspice" ,
"Contents/ Frameworks" ,
wxStandardPath s::Get( ).GetPluginsDir () + "/sim/ngspice", ::Get() .GetExecutableP ath() ).GetPath() + "/../.. /../../ ../Contents/ PlugIns/ sim/ngspice"
"../Plugins/ sim/ngspice"
wxFileName( wxStandardPaths
#endif /* __WXMAC__ */
This will search for the code model relative to KiCad/kicad. app/contents/ Applications/ eeschema. app
Btw: I can do this from within Ngspice by adding a text window with
.control sim/ngspice/ spice2poly. cm
pre_codemodel ../Plugins/
.endc
to the eeschema circuit diagram. A ngspice command may be preceded by pre_ . Then it is run before the circuit is parsed. The code model is loaded, then the circuit is loaded into the matrix and the simulation runs successfully.
Application: Eeschema 192-g5933ac3b9) , debug build compatible with 2.8)
Version: (5.99.0-
Libraries:
wxWidgets 3.0.4
libcurl/7.54.0 LibreSSL/2.6.5 zlib/1.2.11 nghttp2/1.24.1
Platform: Mac OS X (Darwin 18.7.0 x86_64), 64 bit, Little endian, wxMac
Build Info:
Build date: Oct 2 2019 10:19:28
wxWidgets: 3.0.4 (wchar_t,STL containers,
Boost: 1.69.0
OpenCASCADE Community Edition: 6.9.1
Curl: 7.54.0
Compiler: Clang 9.0.0 with C++ ABI 1002
Build settings: SCRIPTING= ON SCRIPTING_ MODULES= ON SCRIPTING_ PYTHON3= OFF SCRIPTING_ WXPYTHON= ON SCRIPTING_ WXPYTHON_ PHOENIX= OFF SCRIPTING_ ACTION_ MENU=ON GITHUB_ PLUGIN= ON USE_OCE= ON USE_OCC= OFF STDLIB_ DEBUG=OFF STDLIB_ LIGHT_DEBUG= OFF SANITIZE= OFF
KICAD_
KICAD_
KICAD_
KICAD_
KICAD_
KICAD_
BUILD_
KICAD_
KICAD_
KICAD_SPICE=ON
KICAD_
KICAD_
KICAD_