How to relate LTspice with C

Discussion in 'Programmer's Corner' started by pyan_delta, Dec 17, 2008.

  1. pyan_delta

    Thread Starter New Member

    Dec 17, 2008
    Can anyone help me on how to relate LTspice with C? What is the coding (in C language) to run the LT spice by using C?
  2. n9352527

    AAC Fanatic!

    Oct 14, 2005
    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.