There is a workaround using the
.SUBCKT dot command. Here is an example circuit:
And here is the output:
In short you should create a subcircuit with two terminals whose only internal component is the diode you want.
The SPICE code:
.subckt MyDiode A K
D A K 1N4148
defines a subcircuit called
MyDiode with two terminals named
K (these names are local to the subcircuit definition).
.ends ends the definition. The code inbetween is regular SPICE code which says that a diode
D is placed between (local) nodes
K and that diode has a
1N4148 SPICE model.
.lib standard.dio is required to load the models (
1N4148) used inside the subcircuit. If the models of the diodes you want to use are not in the standard LTspice part libraries you must put the complete path in the
.lib directive (see LTspice guide for details).
Note that you have to change the default attributes of the diodes you usually place on the schematic, as shown in this image:
Note that the
Prefix must be changed from
X (to tell LTspice the part is a subcircuit and not a standard diode) and the
Value attribute must be the name of the subcircuit (here
From now on, if you want to change the "implementation" of
MyDiode parts, it is sufficient to change the subcircuit definition, as you can see in the image below, where I changed it to use an