Electronic – LTSPICE – Simulation Portability

ltspice

Does anyone know of a comprehensive source of information on LTSPICE directories, libraries, the Control Panel – Sym & Lib Search, model locations, etc. as they relate to simulation portability?

I have two computers, whenever I create a simulation on one machine, it never runs on the other machine. I always get "Could not open library file"…. even though the precise file it is complaining about is clearly in the location referenced. I have had limited success editing the directory paths in the text files that make up the project, but with no consistency (these files oddly use absolute paths). The only way I can make it work is to enter the entire design over again on the second machine. Makes no difference which machine I start with, the result is the same.

I find LTSPICE simulation portability to be a complete mystery. I would kill for some professional documentation. (something besides the terabytes worth of tidbits scattered across the WWW). I would think that the Control Panel -Sym & Lib Search was added to solve this, but I can't figure out why it exists, seems to do nothing.

Any guidance greatly appreciated.

Best Answer

The unspoken "rule of thumb" is to always create your projects in their own folders, and place inside all the subcircuits, models, symbols, or any other used file (PWL texts, hierarchical schematics, etc). Then the schematic should only use those inside the folder, because then, when you want to send the project to someone (and that someone be able to use it), al you have to do is to archive the project's folder. This assumes you are sending projects to external locations of your computer.

All this despite the fact that LTspiceXVII supports custom library paths. Using this utility, LTspice does not copy your libraries somewhere, it only adds some paths to its settings, so that when you are using one of these custom libraries in a project, though they may be visible in your schematics, others will not see them, even if they add the same custom paths such as yourself, due to the lack of the presence of the libraries in their own storage.

But, if you only use LTspice's path utility, then before sending any project you should first make sure everything is in order: open the .asc file and see lines like these:

SYMBOL Pwr\\Vsense 0 336 R0

Here, you can see that Pwr is not a default folder for LTspice, and neither is Vsense a default symbol. Since you're the one that added, manually, the custom paths, you should know which folders to look for, and what symbols. So, search for these custom names and simply copy both the symbols and subcircuits/models/etc inside the projects's folder.

If, OTOH, you copied your custom symbols and files inside the LTspice's default installation, or My Documents/LTspiceXVII, then I feel sorry for you, you'll have to manually check every name. The methid above relies on the fact that the custom symbols reside in a known folder (Pwr), here, you will only see:

SYMBOL Vsense 0 336 R0

...so good luck with that, but also don't forget to not blame anyone else for this mess -- it's your own doing.

Related Topic