# Step Subcircuit in LTSpice

I try to simulate different MOSFET's for wich a spice model is provided by the manufacturer as a .lib file containing a subcircuit. In my schematic, the subcircuit is included with a .inc <fname> statement and used by changing the Prefix of a NMOS from M to X and setting to value to the name of the subcircuit.

All of this works, however, as I want to compare different MOSFETS, I want to step through a list of different models.

I tried to use the same method as found here:

1. Define numerical models: .model 1 ako:<FET Type>
2. Step over the numerical models

However, this does not work. A error "Unknown subcircuit called" is returned.

Is there another way of stepping over different subcurcuits?

But that doesn't mean it's not impossible, only that, if it fails, you shouldn't complain. First, ako only works with models, which are well-defined internally, while subcircuits can have any topology. For this, rename your subcircuits with numerals, 1, 2, 101, etc, so that they can be used with a .step variable. Then you're set, but, again, don't expect miracles. Here's a quick example:
Alternatively, you can use switches and/or resistors that connect the subcircuits to the rest of the schematic, and step their values between 1m and 1g, for example, but that will make all the subcircuits count towards the matrix solver, even if they won't be used.