As some may aware, I have developed an FRA that is similar to practical hardware FRA.
However, the downside of my FRA implementation is, the result is only stored in .txt file, and the result must be plotted manually by copying the result into excel then plot it.
Or another alternative is to control the simulation by Python and use the python to read the .txt result file automatically.
My question: is there any way to automate the plotting for this FRA method?
or in general, is there any way to use C-block to create a simulation data which then use the Qspice to invoke that data and plot it?
Only, as You already said, to import that .txt file into Python, matlab, etc, and to make a script/code that plot automatically only by reading that .txt file and running the code in Python, matlab, etc
In standard QSpice simulations, when you run a simulation, you can export the data into .csv or ASCII SPICE format from the waveform viewer. Though I have never tried it, you can attempt to write data with DLL block directly into a .csv file with the exact format of QSpice exported output. This might enable you to use the waveform viewer to open that .csv file and generate a plot. Similar to exporting data from the waveform viewer into a .csv file, you can load that .csv file. exported csv with two format, real or complex (R,X).
However, you will need to manually load the .csv file from the waveform viewer. But it may prevent get use of other software for data plot.