Keyboard Shortcuts
Likes
Search
Directory for custom symbols
My team wants to have a shared directory where all Electrical Engineers can place their symbols and libraries so others can re-use them instead of re-creating it.
?
This is what the help doc says Search PathsThis panel allows you to enter additional paths than the default to find symbols and libraries. When entering symbol and library search paths, list each directory on it's own line. This panel also allows you to edit the directory where user-defined discrete component libraries are located, in the field labeled "Location of user.* component library files." ? Questions: 1. Is the search recursive? 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 2. There is one top level to browse a location called "User libraries directory". Is this what I should be using to point to our shared location? If so, why would I need the "Symbol Search Path" and "Library Search Path" boxes that require one directory per line. 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"? ? Thank you |
On Tue, May 20, 2025 at 04:10 PM, Jeff Kayzerman wrote:
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:
?
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.
?
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.
?
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
?
? |
I also want to throw this out there:
?
In my opinion, it is a rather bad idea to edit a standard component and save it with the same name, unless it is saved in LTspice's own components library.? And even then, it is a bad idea (because it likely gets over-written later). ?
Of course this depends on what was edited.? If it is a symbol and if the only edit is to change its appearance on-screen, then do anything you want.? If it is anything else, it risks various problems, one of which is the fact that is risky to share your schematic with anyone else who has a different setup.? Will they get your edited file, or the standard library's copy?? Better to use a different filename.
?
Andy
?
? |
¿ªÔÆÌåÓýYou do not state whether this "shared directory" is on a network drive or not.You are correct that the "Shared paths" are not recursive. This should not not be an issue as far as the "Library Search Path" is concerned. The LTspice installation has no problem with dumping all of its model files into one directory, so neither should you, because you never have to navigate to this directory in use, other than to place model files into it. You have two obvious choices how you do this, assuming you have a network drive for this location. You can either map the network drive to a drive letter, and simply set up this drive letter on everyone's machine, or use an environmental variable. The latter has the disadvantage that although LTspice will always find models from it because path retrieval is delegated to Windows, LTspice does not navigate to this location using the the "Open" button in LTspice's .lib/.inc Editor when right-clicking on a .lib directive in a schematic. The former may be less convenient when using a platform other than Windows. The "Symbol Search Path" provided by Control Panel > Search Paths is much less convenient. Because it it not recursive, you may have to manually enter many directories if you have organised your shared symbols in the the same manner as LTspice does, with multiple categories. My solution to this is neither of the above approaches. I use a symbolic link for the top directory of the symbol library into the LTspice ..\lib\sym tree. Since this is recursive in the LTspice Component chooser (F2), this will work seamlessly the same way it does for the LTspice installation symbol directories. The operations to set up the above arrangements may require familiarity with administrator command line working, and although drive letter mapping can be carried out in Windows Explorer, (directly) setting up environmental variables or symbolic links can't, unless you have installed custom utilities that can do this. --
Regards, Tony On 20/05/2025 22:10, Jeff Kayzerman via
groups.io wrote:
|
Yes, it is recursive. This was changed precisely to address your use case. Simply update to LTspice 24.1.8. You'll find the help also improved accordingly.
?
Best Regards,
Mathias ?
On Tue, May 20, 2025 at 10:10 PM, Jeff Kayzerman wrote:
|
Jeff
?
In reference to number "2. There is one top level to browse a location called "User libraries directory"" below.
?
There is a "User libraries directory" path entry but that item does not point to those symbol/library team directories asked about.
In addition to any symbol/library base folders there are also the standard.??? files.
For example, the standard.bjt file for transistors and standard.dio, .mos, .ind, .cap, .res and .bead files for those other parts.
All of those standard.??? files are just text files.
You may create empty text files named user.???.
Such as user.bjt, user.dio, user.mos, etc...
Put all of those user.??? files in any one directory, possibly your "TEAM" directory or somewhere deeper.
? Make that "User libraries directory" path entry point to those user.??? files.
Now, whenever any schematic may call Q1 as a 2NOddBall, LTspice will search it's standard.bjt file first and if 2NOddBall is not found, LTspice will then search your "User libraries directory"\user.bjt file for the 2NOddBall transistor.
?
All for now,
eewiz ?
Sent:?Wednesday, May 21, 2025 at 3:43 AM
From:?"Mathias Born via groups.io" <mathias.born@...> To:[email protected] Subject:?Re: [LTspice] Directory for custom symbols Yes, it is recursive. This was changed precisely to address your use case. Simply update to LTspice 24.1.8. You'll find the help also improved accordingly.
?
Best Regards,
Mathias ?
On Tue, May 20, 2025 at 10:10 PM, Jeff Kayzerman wrote:
|
On Wed, May 21, 2025 at 06:49 AM, eewiz wrote:
No, some of them are binary files.? Only the .bjt, .dio, .jft, and .mos ones are text, but those are the ones you are most likely to want to customize.? The others are binary files but can be edited inside of LTspice. ?
Andy
? |