Go Back   Home > Forums > >
Home Forums Rules Articles diyAudio Store Blogs Gallery Wiki Register Donations FAQ Calendar Search Today's Posts Mark Forums Read

Software Tools SPICE, PCB CAD, speaker design and measurement software, calculators

Managing libraries in LTSpice
Managing libraries in LTSpice
Please consider donating to help us continue to serve you.

Ads on/off / Custom Title / More PMs / More album space / Advanced printing & mass image saving
Thread Tools Search this Thread
Old 25th February 2020, 06:50 AM   #1
carlmart is offline carlmart  Brazil
diyAudio Member
Join Date: Mar 2001
Location: Brazil
Default Managing libraries in LTSpice

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.
  Reply With Quote
Old 25th February 2020, 07:31 PM   #2
Ludus Tonalis is offline Ludus Tonalis  Europe
diyAudio Member
Join Date: Dec 2009
Location: Southampton and Aegina

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.
  Reply With Quote
Old 26th February 2020, 07:20 AM   #3
bordodynov is offline bordodynov  Belarus
diyAudio Member
Join Date: Nov 2015
Location: Minsk, Belarus
The horrors you described were SWcad3, but then it happened and I stumbled across it. But then this problem was fixed in the same version. And in new versions of LTspice, it never happened. By the way, almost all models from LTspiceXVII fit LTspiceIV (with rare exceptions). So you can update LTspiceIV yourself.
For LTspice users. Libraries of models, examples, etc
LTspiceXVII_2019Jan29.zip — Yandex.Disk

Last edited by bordodynov; 26th February 2020 at 07:29 AM.
  Reply With Quote
Old 26th February 2020, 05:46 PM   #4
Ludus Tonalis is offline Ludus Tonalis  Europe
diyAudio Member
Join Date: Dec 2009
Location: Southampton and Aegina
Originally Posted by bordodynov View Post
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.
  Reply With Quote


Managing libraries in LTSpiceHide this!Advertise here!
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
managing huge trafos nania Power Supplies 42 28th December 2017 09:37 AM
Managing ATX power on etc with a TPS3510 SGK Power Supplies 8 6th October 2015 04:54 PM
Managing multiple inputs & master level... CuttaBoi Analog Line Level 0 19th December 2010 06:28 PM
managing KlarkTechnik DN8000 cibercut Multi-Way 5 26th July 2010 03:20 AM
Managing vibrations on audio equipments Eric Juaneda Everything Else 2 8th November 2008 07:41 AM

New To Site? Need Help?

All times are GMT. The time now is 06:25 AM.

Search Engine Optimisation provided by DragonByte SEO (Pro) - vBulletin Mods & Addons Copyright © 2020 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 15.00%
vBulletin Optimisation provided by vB Optimise (Pro) - vBulletin Mods & Addons Copyright © 2020 DragonByte Technologies Ltd.
Copyright ©1999-2020 diyAudio