How to use script to run multiple AC sweep simulations?

The above script should cover your use case. The only notable change is that you likely want to place the different blocks into a Configurable Subsystem and then use the simulation script to set the active configuration via the ModelVars option (as is done in the above script). Then you can hold the trace of each output. You could remove most of the plotting related code if you’re OK with the axes of the analysis tools scope windows.

The other advance since this post was made is the ability to have simulations run in parallel when using simulation scripts (including the various scripted analyses). I would recommend starting with a basic sequential script in your case, but this is something for future work.

If you get stuck you are welcome to post your model and script.