LTSPICE Folder management

Thread Starter

karrrrl

Joined Aug 9, 2020
6
How does LTspice search for symbols and subcircuits? Is it different for automatically generated symbols and Out of the box symbols? I ask because I ran into an error message that states "Could not open library file "C:\users\*****\Documents\***etc". This was when I tried to run a new project with the sub circuit and symbol stored in the LTsice folder generated during the LTsice install and the model was downloaded from KSIM. The key here is that LTspice is looking in a completely different folder. Instead LTspice looks in in a much older project that also used this part. At the time I saved the third party part in the same folder as the project rather than the LTspice folders.

I have since tried to remedy the problem by deleting the subcircuit model from the old project file and adding file paths in the LTspice control panel to redirect LTspice, but none of this has had an affect.
 

eetech00

Joined Jun 8, 2013
3,856
How does LTspice search for symbols and subcircuits? Is it different for automatically generated symbols and Out of the box symbols? I ask because I ran into an error message that states "Could not open library file "C:\users\*****\Documents\***etc". This was when I tried to run a new project with the sub circuit and symbol stored in the LTsice folder generated during the LTsice install and the model was downloaded from KSIM. The key here is that LTspice is looking in a completely different folder. Instead LTspice looks in in a much older project that also used this part. At the time I saved the third party part in the same folder as the project rather than the LTspice folders.

I have since tried to remedy the problem by deleting the subcircuit model from the old project file and adding file paths in the LTspice control panel to redirect LTspice, but none of this has had an affect.
When LTspice automatically creates a symbol, it populates the "model file" attribute with the folder path to the model file when it was created. If you later move the model file to another folder, an error message will be produced when the symbol is used.

Remove the path from the symbols's "model file" attribute.
You will then need to copy the model file to the current folder and use the ".include" directive on the schematic.
 

Thread Starter

karrrrl

Joined Aug 9, 2020
6
When LTspice automatically creates a symbol, it populates the "model file" attribute with the folder path to the model file when it was created. If you later move the model file to another folder, an error message will be produced when the symbol is used.

Remove the path from the symbols's "model file" attribute.
You will then need to copy the model file to the current folder and use the ".include" directive on the schematic.

I removed the file path attribute (thank you BTW, I didn't realize that was how LTspice found subcircuits) and added the include statement as you suggested. The model seems to now work in any new schematics I make. However, I still get the same error with the same folder path from the old project file when I try running my latest project. Is there another way LTspice saves the old folder path? Perhaps embedded in the schematic?
 

Alec_t

Joined Sep 17, 2013
14,280
LTS has two copies of files: one where you installed LTS and one in your Documents path. Check that the 'model file' attribute in both symbol (asy) files of your component are the same.
 

eetech00

Joined Jun 8, 2013
3,856
I removed the file path attribute (thank you BTW, I didn't realize that was how LTspice found subcircuits) and added the include statement as you suggested. The model seems to now work in any new schematics I make. However, I still get the same error with the same folder path from the old project file when I try running my latest project. Is there another way LTspice saves the old folder path? Perhaps embedded in the schematic?
Remove the symbol from the schematic in the old project, then add it to the schematic again so it updates the symbol information.
 

Thread Starter

karrrrl

Joined Aug 9, 2020
6
LTS has two copies of files: one where you installed LTS and one in your Documents path. Check that the 'model file' attribute in both symbol (asy) files of your component are the same.
Thank you for the suggestion. However, I have already deleted any copies of the model outside of the LTspice sub folder. It turns out I had to replace all iterations of the model in the circuit to reload the parameters in LTspice.
 

Thread Starter

karrrrl

Joined Aug 9, 2020
6
Remove the symbol from the schematic in the old project, then add it to the schematic again so it updates the symbol information.
Thank you eetech00. Replacing the models in the schematic has worked to reload the parameters of the subcircuit correctly. Sim runs like a dream now.
 
Top