How to relate LTspice with C

n9352527

Joined Oct 14, 2005
1,198
What exactly are you trying to do? You can invoke most spice program through command line, for the exact syntax you have to refer to each implementation. To invoke command line in C, you could use something like exec, spawn, etc. Have a read on that subject, usually the help file is quite good.

Reading simulation data is a bit involved, there is no standard on the dat file. For example, I used HSPICE dat file which was a text file with the values written sequentially according to print command in scientific notation, fixed width and no spaces. LTSpice will be different, try opening the dat file in notepad to see if it is text file or binary file.
 
Top