I have used .meas expressions to calculate harmonic values in LTSpice. The problem is that these are now in the error log and I cannot export them. Is there a way to export error log values in a .csv file for example? Is there a better automated way to calculate harmonic values?
The SPICE Error Log actually only shows the contents of the corresponding error log file.
If your project is named
X:\Foo\Bar.asc then the error log will be stored in
X:\Foo\Bar.log. The location of the output files can be changed globally in the Control Panel.
This file can be parsed using a scripting language of your choice. I do not know if there is a way to automatically export just the relevant measurements in a more convenient way.
You can use the LTspice feature to Plot .step'ed .meas data, which will create a file named
X:\Foo\Bar.log.raw, but I do not think that is more helpful. You can opt to use ASCII data files in the control panel, to make these graphs readable, but remember to disable all waveform compression if you take this route.
I ran into similar issues and wrote a log file parser which outputs a csv file. It is a Python script called
ltparse.py and can be found at my GitHub https://github.com/realtime/python-tools
python ltparse.py results.log