Source code coming soon. The GitHub repository is private for now and opens to everyone very soon.
BetterSPICE Beta 0.8.0 Join the beta Download soon
Part VIII  Lists and dataReferenceContentsIndex
56

Environment variables and files

Environment variables change where BetterSPICE looks for things. The desktop app reads them from your user environment when it starts.

56.1For users and integrators

For users and integrators
VariableMeaningDefault
BSPICE_NGSPICEngspice.dll, or the folder containing it.Next to the app, or vendor\ngspice\bin.
BSPICE_PSPICEpspice.exe or its folder. 0 or off turns PSpice off.Found from the registry, C:\Cadence\PSpiceTI, and C:\Cadence, C:\Program Files\Cadence, C:\OrCAD.
BSPICE_PSPICE_TRACESThe most traces saved per PSpice run.4 for PSpice for TI, unlimited otherwise.
BSPICE_PORTThe AI agent control port, for the app and the agent.47800
BSPICE_AGENT_NAMEThe agent's name shown in the app.The name the agent reports.
BSPICE_EXAMPLESThe folder of example circuits.examples next to the app.
BSPICE_PARTSThe folder of part files for the command line.parts, searched upward.
BSPICE_MODELSFolders, separated by semicolons, searched first for the vendor model library.The repository, %APPDATA%\BetterSPICE\models, the working folder.
BETTERSPICE_CATALOGThe model catalogue folder.ui\public\catalog, searched upward.
BSPICE_THREADSThreads for bspice and the app’s native engines: auto or a number. 1 is sequential. --threads and the app’s Threads menu override it.auto: every core but one.
BSPICE_LOAD_THREADSThreads for the device load of one run: a number. Without it a run uses up to 4 when its device load takes more than about 9 µs a step, else one. The result is the same on any number.automatic
BSPICE_NO_FMA1 makes the math library take its plain path on processors with AVX2 and FMA too. The result is the same bits, only slower. For checks.off
SPICE_LIB_DIRWhere ngspice finds its code models.Set from the ngspice folder.

56.2For debugging

For debugging
VariableMeaning
BSPICE_NGSPICE_ECHOPrint every ngspice output line to standard error.
BSPICE_PSPICE_KEEPKeep the PSpice run folders.
BSPICE_PSPICE_DEBUGPrint PSpice's dialogs when it hangs.
BSPICE_PSPICE_TIMEOUTSeconds per circuit when the catalogue is checked in PSpice (60).
BSPICE_MODELS_DEBUG, BSPICE_MODELS_DUMPFolders to keep failing, or all, test decks of the catalogue check.
BSPICE_SEARCH_DEBUGA file for the log of the pin search.
BSPICE_RESOLVE_TRACETrace how model dependencies are found.
BSPICE_VENDOR_DUMPA folder for verify-vendor decks.

56.3Files the desktop app keeps

Files the desktop app keeps
In %APPDATA%\BetterSPICEPurpose
agent-tokenThe AI agent key, made at the first start.
betterspice.logThe log, restarted at 1 MB with the previous kept as .old.
recent.jsonRecent files. A damaged one is kept as recent.json.bad.
window.jsonWindow size and position.
autosave-discardedWritten by Don't save, so the autosave copy isn’t recovered.
parts\My parts.
models\An optional place for the vendor model library.

56.4Browser storage

Browser storage
KeyPurpose
bs.layoutPane sizes.
bs.currentSpeedThe current dot speed.
bspice.autosave.v1Autosave copies of unsaved circuits.
bs.partWizard.v1Part Wizard progress.
bspice.agentRelay, bspice.agentPortThe browser version's agent relay: off, and its port.