Main Content

bdIsDirty

Determine whether model, subsystem, or library has unsaved changes

Description

example

tf= bdIsDirty(bd)returns whether the specified model, subsystem, or library has unsaved changes. Unsaved changes can include changes to the block diagram, configuration parameters, or properties.

Examples

collapse all

Check if models contain unsaved changes usingbdIsDirty.

Check if a single model is dirty.

vdp bdIsDirty('vdp')
ans = logical 0

Check if multiple models are dirty.

vdp f14 bdIsDirty({'f14','vdp'})
ans = 1×2 logical array 0 0

Input Arguments

collapse all

Name or handle of loaded model, subsystem, or library, specified as a numeric array, string array, character vector, or cell array of character vectors.

You cannot check whether blocks, such asSubsystemblocks, have unsaved changes. You can check whether referenced subsystems have unsaved changes. For more information, seeSubsystem Reference.

Data Types:double|char|string|cell

Output Arguments

collapse all

True or false result, returned as a1or0of data typelogical.

  • 1(true) — File has been modified in memory since it was loaded or last saved.

  • 0(false) — File has no unsaved changes.

When multiple files are specified, the function returns a logical array with one entry for each file.

Version History

Introduced in R2017a