Simulink.sdi.getAutoArchiveMode

Determine if the Simulation Data Inspector is configured to automatically archive

Description

example

mode = Simulink.sdi.getAutoArchiveMode returns a logical value that indicates whether the Simulation Data Inspector is configured to automatically archive simulation runs. When mode is true, the Simulation Data Inspector automatically archives simulation runs. When mode is false, the Simulation Data Inspector does not automatically archive.

Examples

collapse all

You can configure the Simulation Data Inspector to retain only the logged data for your current simulation. In iterative design and debugging workflows, this configuration helps prevent accumulation of unwanted logged data on disk. First, check the configuration of the Simulation Data Inspector archive. You can save the parameters to restore your preferences after you finish designing or debugging.

limit = Simulink.sdi.getArchiveRunLimit;
mode = Simulink.sdi.getAutoArchiveMode;

Set the archive limit to 0 and configure the Simulation Data Inspector to automatically archive simulation runs.

Simulink.sdi.setArchiveRunLimit(0)
Simulink.sdi.setAutoArchiveMode(true)

When you simulate your model, the Simulation Data Inspector deletes the previous run and updates the view to show signals in the current simulation.

When you finish designing or debugging your model, you can restore the Simulation Data Inspector archive back to its previous configuration.

Simulink.sdi.setArchiveRunLimit(limit)
Simulink.sdi.setAutoArchiveMode(mode)

Output Arguments

collapse all

Logical value that indicates whether the Simulation Data Inspector is configured to automatically archive simulation runs.

  • true — The Simulation Data Inspector automatically archives simulation runs.

  • false — The Simulation Data Inspector does not automatically archive simulation runs.

Introduced in R2018b