¿ªÔÆÌåÓý

Re: Best or easy way to make Autogenerated LTSpice symbols portable?


 
Edited

Bernt wrote:

The .sym files still have the old path from my other installation as in:

SYMATTR ModelFile %HOMEPATH%\Documents\LTspiceXVII\lib\sym\AutoGenerated\INA826.lib

I am confused now what that must change to for this to work and to work on different installations of LTspice

To be portable, the "ModelFile" attribute must NOT have any of the "path".? In MS-Windows, the path is the directory structure, leading up to the filename itself.? (Some would say that it includes the filename, but I'm ignoring that for purposes of this.)? Your ModelFile attributes should have ONLY the filename.ext, so in this case it should be "INA826.lib" and nothing else.

To change that, DO NOT open the symbol file in any text editor where you see lines starting with "SYMATTR".? Don't do that.? Instead, open that symbol file in LTspice itself.? If you double-click on the symbol file, it should open it directly in LTspice.? Once it is open in LTspice, then press Ctrl-A (hold down the Ctrl key and click the A key), and then edit only the ModelFile attribute, which is the bottom line.? Edit that line so that the contents have just the filename.ext (such as INA826.lib).? Then click OK, and then Save.

Tony offered another alternative, which is to delete the ModelFile attribute completely, and add a ".lib filename.ext" to each schematic that uses that symbol.? That works perfectly well too.? It is very slightly more complicated because you would need to edit the schematics to add the ".lib" command to every schematic that uses that symbol.

Either way, the purpose of the ".lib" command and of the ModelFile attribute are the same.? Both Either of them loads the model file into LTspice for the simulation.? Your schematic and symbol combination should use one or the other, not both.

Andy

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