¿ªÔÆÌåÓý

Re: Directory for custom symbols


 

On Tue, May 20, 2025 at 04:10 PM, Jeff Kayzerman wrote:

1. Is the search recursive?

That depends on exactly which version of LTspice everyone uses.
?
Until recently, user-defined directories were not followed recursively into their subdirectories, forcing you to list each directory.? But Analog Devices has been working to make them followed recursively.? I do not know the current status of the latest LTspice versions, and be aware that the "rules" differ between the four (or five) places where they are used:
  • Symbol directories
  • Model files in .lib commands
  • Model files in .inc(lude) commands
  • Models in symbol ModelFile attributes
  • Models in symbol SpiceModel attributes
?
For maximum compatibility, it is safest to assume searches are not recursive.? But since this is a corporate setting where IT probably controls everyone's version of LTspice, you might do otherwise.
?

I would imagine since the text says "list each directory on its own line" that it is not recursive. However one of my engineers says he has used a nested directory structure for his symbols for years

Note that LTspice does recursively search for symbols in its OWN symbol directory tree.? That is probably what your fellow engineer was talking about.? ?But the user-defined symbol library was different, for years.? If someone used a nested structure, they would have needed to list each subdirectory too.? (Until recently.)
?
Also, LTspice does not - or did not - recursively search its own model file directory.? But you asked about symbols.
?

3. If someone edited a standard component will it take precedence if it is defined in one of these paths (presumably the "User libraries directory"?

If you are talking about symbols (not model files), and if I remember this correctly, you need to have selected either the standard (LTspice-owned) symbol library or the User-defined library.? If the standard library is selected, then it won't see the edited symbol which is located elsewhere.
?
But there are some mysteries about symbol selection that may not be fully understood.? Schematic (.ASC) files usually list the path where a symbol was located when it was added to the schematic, but that path seems to be ignored when the schematic is loaded.
?
The other library (model file) search rules seem to favor LTspice's directories over other locations, so LTspice seems to have a bias in favor of its own library when a model file happens to exist in both places.
?
And as I noted above, some of these things are "moving targets", meaning that Analog Devices might be making changes to clean them up and make them more consistent.? I have somewhat mixed feelings about that, but they are probably steps in the right direction.
?
Andy
?
?

Join [email protected] to automatically receive all group messages.