Post Go back to editing

Reveal inner value indicating the current Simulation type - please

Category: Software
Product Number: LtSpice
Software Version: current 24.0.9 but concerns to any...

Feature request: Built-in simulation type indicator

Could you add a built-in variable or function indicating the current simulation type?

For example, SiTp (Simulation Type), with short values identifying .tran, .ac, .noise, .dc, .op, etc.

This would allow conditional expressions such as:

if(SiTp==1, value1, value2)

A short identifier is preferable, as it would frequently appear in behavioral expressions and conditionals.

The simulator already knows which analysis is being performed, so exposing this information should be straightforward and virtually cost-free, while offering significant benefits to users.

Thank you!

Best regards

Robert

By the way, I couldn't find a "feature-request" tag. Would it be useful to have one?

Edit Notes

Again, added feature request tag, but succeeded
[edited by: MStokowski at 6:49 PM (GMT -4) on 12 Oct 2026]
  • Hi  ,

    This actually might be harder to implement than one would think as it adds another loop of syntax checking before the simulation. That said, it is just as easy to implement yourself, assuming you want different parameter values per analysis type, (see attached example):

    1. Open a schematic
    2. Click the Configure Analysis icon in the toolbar
    3. Click one of the analysis tabs, e.g. Transient and configure as desired
    4. Click OK. The dot command is placed on your schematic
    5. Ctrl + Right-click the analysis command to edit the command directly.
    6. At the end of the command line, press Shift + Return to create a line break
    7. Type your .param statement or statements (Shift + Return for any new lines)
    8. Click OK.
    9. To test your result, Shift-(left)Click the text on the schematic. This should make all of the lines blue, commented. This confirms that the text of the analysis line includes the other parameter lines.
    10. Repeat the above process for another analysis.
    11. Once you have all of your analysis "command groups" placed, simply click the Configure Analysis icon in the toolbar to choose an active analysis (just click the tab and click OK). All other analyses and their "grouped" parameter commands will be commented out.

    I say "just as easy" because the action of choosing the active analysis is no different than if the analysis type were reported. You can also set the analysis type by Shift-clicking the groups in turn to comment out.

    Sim-Type Dependent Parameters.asc

    By the way, I couldn't find a "feature-request" tag. Would it be useful to have one?

    The tag interface is a little convoluted. Assuming you see what I see, you would type the new tag, and it shows up the search/selection list in italics. Select the new tag to place it in the tags field.

    mike

Before You Switch


Switching languages will make ADI Explorer unavailable. Resume your session by switching back to English and reopening ADI Explorer.