Documentation

bdIsDirty

Whether block diagram has unsaved changes

Syntax

isDirty = bdIsDirty(bdname)

Description

example

isDirty = bdIsDirty(bdname) returns whether or not the loaded block diagram bdname has unsaved changes.

Examples

collapse all

Check if models contain unsaved changes using bdIsDirty.

Check if a single model is dirty.

vdp
bdIsDirty('vdp')
ans =

  logical

   0

Check if a cell array of models are dirty.

vdp
sf_car
bdIsDirty({'sf_car','vdp'})
ans =

  1×2 logical array

   0   0

Input Arguments

collapse all

Loaded block diagram name, specified as a character vector, a cell array of character vectors, or a double array. All character vectors must be the names of loaded block diagrams. All doubles must be the handles of loaded block diagrams. It is an error to supply an invalid handle, a handle to anything other than a block diagram, a path to a block or subsystem, or a block diagram that is not loaded.

Data Types: double | char | cell

Output Arguments

collapse all

Whether block diagram has unsaved changes, returned as a logical array with one entry for each block diagram. The logical value is true if the block diagram has been modified in memory since it was loaded or last saved, and false if there are no unsaved changes.

Introduced in R2017a

Was this topic helpful?