Electronic – Where is the text for the symbol stored in LTspice

ltspicesymbol [~]

The following is an image of the symbol opamp.asy.
LTspice symbol with text

I opened the same file using Notepad++ and have pasted the contents below:

Version 4
SymbolType CELL
LINE Normal -32 32 32 64
LINE Normal -32 96 32 64
LINE Normal -32 32 -32 96
LINE Normal -28 48 -20 48
LINE Normal -28 80 -20 80
LINE Normal -24 84 -24 76
WINDOW 0 0 32 Left 0
SYMATTR Prefix X
SYMATTR Description Ideal single-pole operational amplifier. You must .lib opamp.sub
SYMATTR Value opamp
SYMATTR SpiceLine Aol=100K
SYMATTR SpiceLine2 GBW=10Meg
PIN -32 48 NONE 0
PINATTR PinName invin
PINATTR SpiceOrder 1
PIN -32 80 NONE 0
PINATTR PinName noninvin
PINATTR SpiceOrder 2
PIN 32 64 NONE 0
PINATTR PinName out
PINATTR SpiceOrder 3

I am surprised to find that the text Unnn is missing in the file. Where is this text stored? For example, if I make a symbol my_symbol.asy, and using the GUI I add some text to it reading this_is_my_symbol, then the file my_symbol.asy does contain the aforementioned string when opened in a text-editor.

Is this different for the symbols and the subcircuits shipped with LTspice? In that case where are such strings stored?

Best Answer

It's stored in the .asc file that contains your circuit. This makes sense because you don't want to store the name for a specific part in the part file, rather anything you rename a part(C1, C2, C3, Etc) gets stored in the .asc file which contains the components and wiring of your circuit.

Edit: I understand now what you were asking. The line SYMATTR Prefix X is the line that the U is stored under. I don't know why the character X shows up as a U for the opamp but if you change that character to an A and open the model you'll see Annn instead. Every other character, including multiple characters, I changed the value to was mirrored in ltspice when i opend the .asy file.