Post Go back to editing

LTSpice v26.0.1 can't seem to find add-in (user) library files

Thread Summary

The user encountered issues with LTSpice v26.0.1 not finding user library files for a Würth pulse transformer. The solution involved placing the schematic, library, and symbol files in the same directory, and ensuring the correct search paths were set in LTSpice settings. The symbol search paths are recursive, but library search paths are not.
AI Generated Content
Category: Software
Product Number: LT3999
Software Version: 26.0.1

3326.16V-to-19V_LT3999.zip

Description above is from (I thought) a related post - ignore

LTSpice v26.0.1 can't seem to find add-in (user) library files - I've tried using the 'inc' statement and the '.lib' statement with a full path, but the simulation aborts and returns a 'file not found' message with just a '.lib <modelname>.lib' reference (i.e. no path). I've played with symbol and library search paths in settings, putting the library file in different locations, and reorganizing a slightly-chaotic folder structure for downloaded files and libraries. Nothing seems to work.

I did see a related post for someone with same/similar issues on MacOS. The solution was to revert back to v24.x (under emulation environment) and then the library was found. Also suggested was to put the full model in the simulation (schematic). I'm trying to use a pulse transformer from Wurth,

Has something broken here?

Thread Notes

  • Hi  ,

    MacOS, 17.x works very differently, and is not a good comparison.

    Easiest way to fix the problem.

    1. Place Schematic, lib file and symbol file all in the same directory.
    2. Open the schematic
    3. If you are given a message that the symbol file can't be found, that's OK. Just follow these steps.
      1. Place Component.
      2. At the top drop down, choose schematic directory.
      3. Double click the symbol.
      4. Move it into place.
    4. Comment out (shift+click) the .inc directive or delete it
    5. Run

    If you want a similar structure for your user files as the standard LTspice library structure, then you would set up as such.

    • Create the structure. I.e., based on your schematic:

    D:\LTSpice_work\lib\sub\
    D:\LTSpice_work\lib\sym\

    • In LTspice Settings > Search Paths, set up each search like this:

    User Directory: D:\LTSpice_work\
    Symbol Search: ADD D:\LTSpice_work\lib\sym
    Library Search:ADD D:\LTSpice_work\lib\sub

    Place your files appropriately. Note that the symbol search paths are recursive. Library search paths are not.

    For the Würth transformer, the symbol is made without an absolute path to the library, which is good.

    mike

  • Thanks Mike, that worked. The thing I was missing was that the library search path was *not* recursive. For the user library path in your suggestion above, doesn't that need to be the default (user/appdata/...) installation path for the default libraries? Or  does LTSpice intrinsically know of the default path?

  • Hi  ,

    the library search path was *not* recursive

    Yes, can be a bit of a trap. The reason this is the case is so LTspice doesn't end up searching, say, your entire onedrive in a simulation, which would be frustrating indeed. Symbols, on the other hand are loaded at startup, or when you Refresh, so simulation times are not affected.

    For the user library path in your suggestion above, doesn't that need to be the default (user/appdata/...) installation path for the default libraries? Or  does LTSpice intrinsically know of the default path?

    No. You do not need to point to appdata at all, and in 99.99% of installations, will never have to refer to it. Intrinsic to the installation. Old LTspice used to put everything in documents, which is pretty bad form from a Windows (and Mac) perspective. This way, your custom libaries are untouched by LTspice when you update, or delete LTspice.

    The User Files, top item is a way to define one place where LTspice will look for your schematics, symbols, user.x and other you-want-default stuff. You can set this to whatever you want. The Symbol search paths are recursive, and bonus, show up as individual options in the top drop-down in the Place Components dialog.

    The last item, Simulation Library Paths, is handy if you have created some structure for your libraries.

    mike

  • Hi Mike -

    Facing similar issues again, but I have the paths set appropriately, and the lib files in those locations. But I also tried copying the lib files to the same folder as the schematic, and LTS still doesn't find the file. I have a diode model in a *.lib file, not a subckt - should be fine, right? Graphic shows the error, the configuration, and 'proof' that the file exists at the right location. zip'd schematic and lib file attached

     28V-to-19V_LT3999.zip

  • I suspect my issue is with the Diode symbol and trying to point to an 'external' model. I can't seem to find a default LTS symbol that does this, as an example to follow. I'm very familiar with standard spice syntax, it just isn't clear how to set the attributes that pop up for a RMC (right-mouse-click) so that the netlister produces the right syntax.

  • I also vaguely remember that when you were placing a symbol from F2, there was an option to "close the dialog and edit the component table" (or something like this). You could augment the standard list of say, diodes, by adding more lines to the "diode table". I don't see that option now, and I can't find any file that looks like it is the source of those diode models, as an example.

  • Hi  ,

    You actually have a few options, and there are errors in the setup of the symbol.

    Option 1: Use user.dio (must be in D:\LTspice_work\work\)

    Ideally, diode models should be in user.dio, which must be in your User Files directory. I took the library file and extracted the model card and created a user.dio file based on that. I actually copied the standard.dio file to look at it and determine structure. The typical model card in a .dio file is as such:

    .model 1N914 D(Is=2.52n Rs=.568 N=1.752 Cjo=4p M=.4 tt=20n Iave=200m Vpk=75 mfg=OnSemi type=silicon)

    Nevertheless, the user.dio file does support line continuation, so I left in the + line breaks and created this file. I added the non-sim stuff mfg, Iave, etc. from the Vishay datasheet.

    user.dio.zip

    I left out the temp behavior subcircuit.

    I put that file in my User Files directory, but got an error message. This is because the symbol attributes are messed up, as can be seen by Ctrl+Right-Click on the body of the diode. That Value "D" will be read into the netlist and won't be understood.

    If you've opened the attribute editor, close it for now.

    Once you have created user.dio, and put it in your user directory, the cleanest way to fix your diode now is to Right-click the diode body and click Pick a New Diode. Look for the diode in the list. Shows up at the bottom for me without sorting.

    Choose the diode and click OK.

    Now,Ctrl+Right-Click your symbol again and you will see the model is in there twice, which will cause the same error as before:

    One of them has to go. Delete the SpiceModel one, as Pick a Diode clearly changed the Value. Don't ask why; just go with it. Click OK.

    Now you can simply right-click the Diode body to see:

    You should be able to run now.

    Option 2: Use .inc to reference the library as is

    With the library in any search path (User Files, Schematic directory, or defined Simulation Search Path), just add this to your schematic:

    .inc VS-2EQH02HM3.lib

    You no longer use Pick a Diode, but you still need to manually fix the diode attributes as in Option 1. 

    Option 2: Place the Library text in you datasheet

    You can simply put the entire text of the library on your sheet. Similar to .inc, but no include.

    Option 3: Create a new symbol for your diode

    More involved, but essentially, you would use a copy of diode.asy and call it VS... asy. Open the symbol in the symbol editor, and choose Edit Attributes. SpiceFile is the library file. Value is the model card name.

    You can save the symbol in any path under symbol search or User Files. Do not put in appdata!

    Now, you can simply place your new symbol when you want that particular device.

    mike

  • Thanks Mike for the helpful, detailed info!

    I just ended-up resolving about the time you responded - I found the 'standard.dio' file in ..\appdata\.. and remembered that they were text files. I ended-up and 4 or 5 vishay models to that file, then I got a 'clean' diode and picked the model of interest. Everything you said makes sense. I then remembered that I don't want any customization in the 'standard.dio' file because it will probably get over-written. Then I read your response and created the user diode file as suggested, and reverted the standard library back to original. I wouldn't have guessed that the 'Value' field needed the model name instead of "SpiceModel" - again, another area that isn't very intuitive. I think I'm good now. Thanks again!

  • Hi  ,

    . Then I read your response and created the user diode file as suggested, and reverted the standard library back to original. I wouldn't have guessed that the 'Value' field needed the model name instead of "SpiceModel" - again, another area that isn't very intuitive.

    Ah good, had to get to this part. Well done. Yes, editing standard.foo is not good. If you haven't already figured it out, you can have a user.foo for the other components, too.

    I wouldn't have guessed that the 'Value' field needed the model name instead of "SpiceModel" - again, another area that isn't very intuitive. I think I'm good now. T

    Turns out, you could have either SpiceModel or Value filled in, but not both. There was a time where LTspice did the confusing thing of allowing both. Value is preferred here because that is where the model will be placed when you Pick a New Diode. SpiceModel is preferred when you have a library of subckt statements, SpiceModel would the subcircuit name.

    mike