Main Content

Simulink.sdi.setAppendRunToTop

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

Since R2022b

    Description

    Simulink.sdi.setAppendRunToTop(ord) configures the order in which the Simulation Data Inspector appends new runs in the work area or archive.

    • 1 — New runs are added to the top of the archive or work area.

    • 0 — New runs are added to the bottom of the archive or work area.

    Whether the Simulink.sdi.getAppendRunToTop function sets 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.

    example

    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)

    Input Arguments

    collapse all

    Whether Simulation Data Inspector appends new run to top of work area or archive, specified by true (1) or false (0).

    Data Types: logical

    Version History

    Introduced in R2022b