Is there a spice directive to export waveform data in LTspice?

I'm sorry to necromance, but you can run LTspice with:

scad3.exe -ascii -b netlist.net

And it'll give you an ascii file output. You can combine this with the .save directive to get convenient output.


I don't think you can generate a txt format directly from the ltspice command line. I recently looked into this and I came across an old discussion which includes the primary author of LTSpice and indicates (at least as of 2003) 1) you can't export text directly from the command line, 2) the binary format is intentionally "secret", 3) there is a separate executable available to do a translation. ( http://www.electronicspoint.com/threads/pspice-global-parameters-time-and-temperature.25088/ note that although the link says pspice, ltspice is also discussed)

So I think the best option is a two step process. 1) run the simulation from command line to generate binary data output 2) run the conversion utility from the command line to generate txt format

You can get the conversion utility "ltsputil" from the yahoo LTspice users group (https://groups.yahoo.com/neo/groups/LTspice/files/%20Util/ltsputil/) and its usage seems to be fairly well documented but with no guarantee it is 100% correct in output or that it won't break in future LTSpice.

I didn't try it yet but may in the near future. Please let me know if you have success with it.