Error about no sim.name field

I found a spice model on the internet for 1N4148. (I didn’t look properly for the one already included with Kicad.). However when attempting to use it I got a “No sim.name field” error as soon as I tried to simulate it.

Here is the contents of this file (below). Is there something wrong with it that I should be aware of? Thanks.

* DIODES INCORPORATED AND ITS AFFILIATED COMPANIES AND SUBSIDIARIES (COLLECTIVELY, "DIODES") 
* PROVIDE THESE SPICE MODELS AND DATA (COLLECTIVELY, THE "SM DATA") "AS IS" AND WITHOUT ANY 
* REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING ANY WARRANTY OF MERCHANTABILITY 
* OR FITNESS FOR A PARTICULAR PURPOSE, ANY WARRANTY ARISING FROM COURSE OF DEALING OR COURSE OF 
* PERFORMANCE, OR ANY WARRANTY THAT ACCESS TO OR OPERATION OF THE SM DATA WILL BE UNINTERRUPTED, 
* OR THAT THE SM DATA OR ANY SIMULATION USING THE SM DATA WILL BE ERROR FREE. TO THE MAXIMUM 
* EXTENT PERMITTED BY LAW, IN NO EVENT WILL DIODES BE LIABLE FOR ANY DIRECT OR INDIRECT, 
* SPECIAL, INCIDENTAL, PUNITIVE OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR IN CONNECTION WITH 
* THE PRODUCTION OR USE OF SM DATA, HOWEVER CAUSED AND UNDER WHATEVER CAUSE OF ACTION OR THEORY 
* OF LIABILITY BROUGHT (INCLUDING, WITHOUT LIMITATION, UNDER ANY CONTRACT, NEGLIGENCE OR OTHER 
* TORT THEORY OF LIABILITY), EVEN IF DIODES HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES, 
* AND DIODES' TOTAL LIABILITY (WHETHER IN CONTRACT, TORT OR OTHERWISE) WITH REGARD TO THE SM 
* DATA WILL NOT, IN THE AGGREGATE, EXCEED ANY SUMS PAID BY YOU TO DIODES FOR THE SM DATA.



*SRC=1N4148W;1N4148W;Diodes;Si;  75.0V  0.300A  4.00ns   Diodes Inc. 
.MODEL 1N4148W D  ( IS=10.4n RS=51.5m BV=75.0 IBV=1.00u
+ CJO=2.00p  M=0.333 N=2.07 TT=5.76n )

Holger Vogt has a huge amount of information about ngspice that currently can be accessed by clicking on his avatar and then again on his new and enlarged avatar, which will open his “summary” page.
Open the links on the LH side under the title “Top Topics”.
Here is a link to his “summary” page.

There should be some information there to help solve your problem.

Can you provide an example project with this error? My guess is this is a KiCad-side issue, something to do with the Simulation Model dialog in the Symbol Properties window not working properly.

EDIT: The model worked for me first try, though I’m currently using the nightly rather than v8.

I had this a few times. IIRC, it was bacuse I did not select the model in the Eeschema simulation dialogue. It’s not enough just to select the file, you have to select the specific model as well.

That might be it but I tried to reconstruct the problem just now and used the same spice file I used originally and this time it worked without the error. It gave a slightly different voltage drop across the diode but the sim did complete. The one thing I didn’t do originally is I didn’t copy the spice file into the project directory so I am wondering if that had something to do with it.

I doubt it. I always keep my models in a subdirectory of the project directory and have no issues.