How can I generate a .raw file for use in a 3rd party waveform viewer?

In fact adding a .control section to the eeschema generated netlist may raise some caveats.

It is largely untested in this environment (shared ngspice, simulation called by bg_run in a second thread) and thus bears some risk due to the multithreading involved. It may happen that the write command starts before the simulation has finished, then writing the old data.

It might be much better that the eeschema interface handles all the issues directly and care for thread synchronization. This has to be coded into eeschema. Therefore it is necessary to notify the KiCad developers and add these issues to the wishlist.

2 Likes

I’ve reported this as a wishlist item at:

To finally answer the OPs question (how to add writing a raw file?):

Add the following .control section as a text box to the Eeschema window:

.control
set controlswait
write /home/steve/MyKiCAD/TB_TLV3201.raw all
.endc

set controlswait will delay all commands following until the simulation (started automatically in a second thread by internal command bg_run) has finished.

1 Like