Managing libraries in LTSpice

Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.
Until now I am confused about how to manage libraries in LTSpice, particularly if you prefer to use version IV.

How do you set the program to look for the latest library you provided, adding newer or not present parts?

LTSpice installs in two places by default: in Program Files and in Users/user name/My Documents. LTSpice XVII seems to find the latest library easily, but LTSpice IV does not.

Does anyone know how to set LTSpice IV to look for the right library?

Before anyone makes this question: I'm interested in keeping using LTS IV, no XVII.
 
Carlos

I have both LTspice IV and XVII installed on my laptop. My understanding is that the library for IV is at C:\Program Files (x86)\LTC\LTspiceIV\lib and all users share the same library.

The situation is more complicated with XVII. Each user works with their own copy of the library situated at C:\Users\UserName\Documents\LTspiceXVII\lib. It makes much more sense to me for each user to have their own library files. However, there is an additional copy (a master copy?) at C:\Program Files\LTC\LTspiceXVII\lib.

Regardless of the version, there can be issues when working directly with the library files. For example, suppose one adds a new transistor model to the standard.bjt file with the intention of making it instantly available when one clicks on "Pick New Transistor". What happens when LTspice updates and writes a new version of the file to disk? The model for the new transistor vanishes into the ether and simulations that use the new transistor model will not run until the model is added back to the updated standard.bjt file. This could easily become something of a nightmare with a large number of components added to various standard.xxx files, especially with regular updates.

It is true that IV is no longer supported and will never get updated, so perhaps this is less of an issue with IV, though exactly why one might wish to deny oneself the advantages of regular updating with new models, new features, bug fixes etc is not entirely clear to me.

Another issue is that if one wishes to share a simulation (e.g. post it on this forum) the simulation will not run unless one also shares one's standard.xxx files. Good luck trying to get others to overwrite their regularly updated lib files with old but altered versions from IV.

To sidestep these issues one needs to keep one's own library files separate from LTspice's own. There are at least two ways to do this. It is possible to create your own library and to instruct LTspice where to find it using the .lib command. Search for .lib in Help for details. This overcomes the updating problem but does not help with portability.

In my opinion the best solution is to create a file within which are all the models you collect or create. The file is then copied to each folder that contains a simulation file and included with a .inc command. Any non-standard symbols (.asy files) are also included in the same folder. In this way LTspice can do whatever it likes with its own lib files with no risk of it overwriting yours. Moreover, your sims are now portable because all one has to do to share a simulation is to zip the containing folder and share that.
 
Last edited:
The horrors you described were SWcad3

I presume you are referring to LTspice overwriting standard.xxx files when updating and losing models added manually as a result.

This happened to me, just once, years ago. When I figured out what had happened, I switched to keeping "extra" models in the same directory as the .asc file. This also has the huge advantage of straightforward portability.
 
Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.