Keyboard Shortcuts
Likes
Search
Transformer models WAS: New Simulator Written by Mike Engelhardt
#Transformer
Another FYI --
In Bordodynov's previous Simple.zip (but not in his most recent one), he changed the filenames, e.g., from "standard.mos" to "bordodynov.m".? It is the same file and has the same contents.? But by naming it "bordodynov.m", it eliminates the "conflict" with LTspice's own "standard.mos".? Therefore he did not need to prepend the ".\" before the filename to make LTspice load the one in the current directory before finding the one in the lib\cmp directory. Andy |
开云体育AFAIK, Windoze [sic] accepts the forward slash '/' as a directory separator; I don't believe Unix-derived systems accept the backslash '\' as a directory separator. Over 40 years of *nix and various RTOS admin and development,
with a few years of CP/M and MSoft pain. On 2023-08-19 07:54, Tony Casey wrote:
On 19/08/2023 12:52, Jerry Lee Marcel wrote: |
Tony wrote, "I investigated this and found that ".lib" and ".inc" seem to behave differently. ".inc" looks in the schematic (current) folder first, but ".lib" looks in the standard library folder first.?" |
Jerry wrote, "I have done it, and I still get the message Could not open include file "standard.bjt.inc""
Why did you try to load (a) a different filename, and (b) a filename that doesn't exist? The filename was ".\standard.bjt" (without the quotes).? Not "standard.bjt.inc".? The only way the ".inc" got there was if you put it there.? LTspice never adds filename extensions to filename you specify. Perhaps you pasted three commands but somehow deleted their line-breaks, so that the second line was concatenated to the end of the first? re: "( I think the space-dot-backlash is suspicious)" That is standard Windows (borrowed from Unix) nomenclature for "the current directory.? Believe me, it works.? Maybe not in MacOS, I can't test it there, maybe not in Linux, though I suspect it should work in either of those too.? But it definitely works in Windows.? Helmut Sennewald used to use it occasionally. John wrote, "You can't have \ in a Windows filename." Not in a filename, correct.? But it is part of a filespec.? It works, believe me.? If you don't believe me, try it. Jerry wrote, "Of course. Just the same, the dot (or comma) before the name doesn't seem right to me. But even after eradicating them, it doesn't work." The reason it doesn't work AFTER eradicating them, is because you eradicated them.? Eradicating them allows LTspice to use its own search order, which looks in lib\sym before looking in the current directory, and it finds another "standard.bjt" in lib\cmp which you do not want.? The current directory is '.', and Windows uses '\' to separate directories, so the CORRECT format is to put ".\" immediately before the filename, thus giving us ".\standard.bjt". But as I keep saying, if you still don't believe me, Try it.? Arguing that it's wrong will get you nowhere, when in fact it does work.? TRY IT. John wrote, "I wonder if a strange character has crept in. Only Bordodunov can tell." No, a strange character didn't creep in, and Bordodynov didn't put it there.? I did.? It was very much intentional.? And it is right to have it there. Andy |
开云体育On 19/08/2023 14:38, Dave Wade wrote:I stand corrected. I have forgotten about the stuff I did at the dawn of my career in 1970s. We had various small DEC machines then before VAX/VMS came along. I came to DOS at about V3. It already had directories by then.On Sat, Aug 19, 2023 at 12:55 PM, Tony Casey wrote:This is general thing. It also applies to Unix/Linux and MacOS, except directories (folders) are separated by "/" instead of "\", as in Windows. The developers of DOS/Windows? decided to do all kinds of things differently, despite there for no good reason and having precedents that worked.I beg to differ, there are very good reasons for using "\". History shows that DOS v 1.0 did not have directories, but did use "/" for command line options. There are also good precedents to this as many DEC operating systems e.g. RSX-11 and VMS both use "/" as the command option delimiter and DOS 1.0 copied this along with their use of ":" to separate a device name from a file name. However when directories were added to DOS rather than use the somewhat complex convention DEC used for directories, where the directory names are enclosed in square brackets and separated by "."s they used the "\" as the directory separator so DOS Fully Qualified File Names are a sort of uncomfortable mish-mash of RSX/VMS and UNIX. Of course the use of "\" is purely arbitrary. No "\" characters are ever stored on disk. Oddly whilst commands only accept "\" as the separator, the underlying API accepts both, as one can see if you do :- DIR "C:/PROGRAM FILES" from a command line prompt.... Thanks for the history lesson. --
Regards, Tony |
On Sat, Aug 19, 2023 at 12:55 PM, Tony Casey wrote:
This is general thing. It also applies to Unix/Linux and MacOS, exceptI beg to differ, there are very good reasons for using "\". History shows that DOS v 1.0 did not have directories, but did use "/" for command line options. There are also good precedents to this as many DEC operating systems e.g. RSX-11 and VMS both use "/" as the command option delimiter and DOS 1.0 copied this along with their use of ":" to separate a device name from a file name. However when directories were added to DOS rather than use the somewhat complex convention DEC used for directories, where the directory names are enclosed in square brackets and separated by "."s they used the "\" as the directory separator so DOS Fully Qualified File Names are a sort of uncomfortable mish-mash of RSX/VMS and UNIX. Of course the use of "\" is purely arbitrary. No "\" characters are ever stored on disk. Oddly whilst commands only accept "\" as the separator, the underlying API accepts both, as one can see if you do :- DIR "C:/PROGRAM FILES" from a command line prompt.... Dave G4UGM
|
开云体育'DOS ain't done till Lotus won't run' (or will
run). Apparently mythical, but they would say that, wouldn't
they? On 2023-08-19 12:54, Tony Casey wrote:
On 19/08/2023 12:52, Jerry Lee Marcel wrote: |
开云体育On 19/08/2023 12:52, Jerry Lee Marcel wrote:Interesting.The files are in the same directory as the .asc, as they were in Bordodynov's zip file. I investigated this and found that ".lib" and ".inc" seem to behave differently. ".inc" looks in the schematic (current) folder first, but ".lib" looks in the standard library folder first. I rarely use ".inc" unless I actually want *include* something in my schematic that is not a model file. With some libraries consisting of hundreds of models and 1000s of lines, the whole file is effectively appended to the schematic before analysis, rather than just the models that the schematic references. Perhaps, these days, it actually makes little difference to speed, but to me it just doesn't feel right. --
Regards, Tony |
开云体育On 19/08/2023 12:52, Jerry Lee Marcel wrote:Le 19/08/2023 à 12:04, Tony Casey a écrit?:This is general thing. It also applies to Unix/Linux and MacOS, except directories (folders) are separated by "/" instead of "\", as in Windows. The developers of DOS/Windows? decided to do all kinds of things differently, despite there for no good reason and having precedents that worked. --
Regards, Tony |
Le 19/08/2023 à 12:04, Tony Casey a écrit?:
I just created a simple example to prove that this nomenclature does work. But the file must be in the right place.Is it particular to LTspice or a more generalized thing? The files are in the same directory as the .asc, as they were in Bordodynov's zip file. I typed the command ".inc standard.bjt" in the .asc and it works. No need for .\ I guess my problem came from a corrupted character when I copied Andy's directives. |
开云体育I just created a simple example to prove that this nomenclature does work. But the file must be in the right place.Use ".lib .\standard.dio" if the file is in the same folder as the schematic. The reason ".\" is necessary is because LTspice looks first in: "c:\users\joebloggs\AppData\Local\LTspice\lib\cmp\" ..before the current folder and will find the default "standard.dio" before the substitute one. The ".\" overrides this. Use ".lib ..\standard.dio" if the file is in the folder *above* the schematic Use ".lib ..\..\standard.dio" if the file is in the folder *2 levels above* the schematic etc. If " .lib .\standard.dio" results in "Could not open file .lib .\standard.dio", it is because the file isn't where it should be. OR .. for ".lib ,\standard.mos", it is because a comma has been used instead of a dot (look carefully). --
Regards, Tony On 19/08/2023 11:20, Jerry Lee Marcel
wrote:
|
开云体育It's not just a file name, but a path, just as c:\users\joebloggs\AppData\Local\LTspice\lib\cmp\standard.bjt is. It is sometimes called a fully-qualified file name (FQFN).LTspice inserts a FQFN as the ModelFile attribute whenever you "autogenerate" a symbol. We all know how unhelpful that can be --
Regards, Tony On 19/08/2023 11:07, John Woodgate
wrote:
You can't have \ in a Windows filename. |
开云体育I agree that it isn't right. I wonder if a
strange character has crept in. Only Bordodunov can tell. On 2023-08-19 10:20, Jerry Lee Marcel
wrote:
|
开云体育Of course. Just the same, the dot (or comma) before the name
doesn't seem right to me. But even after eradicating them, it
doesn't work. Le 19/08/2023 à 11:07, John Woodgate a
écrit?:
|
toggle quoted message
Show quoted text
On Thu, Aug 17, 2023 at 07:57 PM, Andy I wrote: |
On Thu, Aug 17, 2023 at 07:57 PM, Andy I wrote:
But you should do this: I have done it, and I still get the message Could not open include file "standard.bjt.inc" I have tried all sorts of amends to your directives ( I think the space-dot-backlash is suspicious), to no avail. |