Main Content

Simulink.sdi.getAppendRunToTop

Get order in which Simulation Data Inspector appends run in work area or archive

Description

example

ord = Simulink.sdi.getAppendRunToTop returns a logical value that indicates whether the Simulation Data Inspector appends a new run above or below prior runs in the archive or work area.

  • 1 — New runs are placed above prior runs in the work area or archive.

  • 0 — New runs are placed below prior runs in the work area or archive.

Whether the Simulink.sdi.getAppendRunToTop function gets the order of simulations in the archive or the work area is determined by the Automatically archive setting:

  • When Automatically archive is enabled, the setting applies to runs in the archive.

  • When Automatically archive is disabled, the setting applies to runs in the work area.

By default, new runs are placed below prior runs in the archive. For more information about configuring the archive behavior, see Simulink.sdi.setAutoArchiveMode.

Examples

collapse all

First, determine the order that runs are currently stored in the archive.

ord = Simulink.sdi.getAppendRunToTop
ord = logical
   0

By default, runs moved into the archive are placed below runs already in the archive. To have runs placed above the runs already in the archive, change the value of the Simulink.sdi.setAppendRunToTop function.

Simulink.sdi.setAppendRunToTop(true)

You can restore the original placement of runs as they move to the archive by passing ord back to the set function.

Simulink.sdi.setAppendRunToTop(ord)

Output Arguments

collapse all

Whether Simulation Data Inspector appends new runs to top of work area or archive, returned as logical 1 (true) or 0 (false).

Version History

Introduced in R2022b