Keyboard Shortcuts
ctrl + shift + ? :
Показати всі комбінації клавіш
ctrl + g :
Не доступний для безкоштовних груп.
ctrl + shift + f :
Знайти
ctrl + / :
Сповіщення
esc to dismiss
Лайки
Пошук
.TEXT cards
I've been searching and I can't find a definitive answer, in LTspice and other spices.
Referencing this (long) discussion <https://groups.io/g/LTspice/message/135359> from a couple years ago, there may be others, GG.io is not great for following threads.
I was wondering if the .TEXT card should work as a way to make it possible to have the location of a library unrelated to the machine it is running on. This is for the purpose of SCM, to allow devs to manage their models libraries, sims etc, in Git rather than haphazardly as is currently done, to avoid the issue of being uable to re-run your or somebody elses sim at some time in the future. Not to mention the issue of random edits and multiple copies on each person's machine. This would also allow continuous integration, e.g. by ensuring filter coeficients are correct.
The bigger worry is that in this company, when a person leaves, we have the strage IT policy of simply binning everything in their home and HDD unless they hand it over officially, i.e. actully copying it to another person or shared storage. That means much, especially history LTspice as the files tend to be disorganised are lost.
Referencing the above thread, I think the issue with the proposed environment variable is that it's non-portable, and relies on a machine having a particular variable setup for a particular simulation. It would be much better if all the details to construct and re-run the sim are kept in the schematic (or some sort of project file). Now the way I understand it is that the .TEXT card , e.g. .TEXT <var>="Value" ...is like a C macro, in that unlike braces { <code> } the bar | <var> | is only evaluated during elaboration of the circuit. However I tried and a few combinations this with .INCLUDE and .LIB and it seems to just try and open a file with that as it's name, rather than expanding it. e.g.
.LIB | libpath |
or simply
| libpath | being in the model field of the symbol.
same with .INCLUDE Tries to open a file litterally called "| libpath |" despite the .TEXT (and also tried a .PARAM for good measure) is in the line above.
I could find no documentation on what can be between the bars, except for one example where somebody writes something like | "R" + "5" | . Does that mean that + is a string contatenation. Are there other operators?
Is this correct behaviour? or am I using it wrong, is this a bug, or maybe feature request? Secondly, but closely related, is there a way to spawn a shell command from the simulation, e.g. to trigger storage, CI or SCM?. I know only of .FERRET which (though cute and brings back both fond but sad memories) would be complex to use as it would need something to be ferreted. (Though getting single files over https in Git is a thing, expanding a zip of a library would be a problem) Cheers,
Jay |
Why remove it? It is part of the 'standard' syntax (in quotes as there is no such thing). Anyway the same would work for .PARAM too. The issue with environment variables is maintanance and setup. I am trying to get away from simulations only working on a particular machine for one person, on a Tuesday. Of course there are alternates, such as some sort of .INI or .PRJ file. But putting stuff in the schematic makes it transparent, which is always better. |
Повідомлення
Більше
Додаткові параметри
Більше
to navigate to use esc to dismiss