Determine whether model has changed since it was loaded
Return Error When File Has Changed
To ensure that code is not generated for a model whose file has changed on disk
since it was loaded, include the following in the
'entry' section of
if (slIsFileChangedOnDisk(sys)) error('File has changed on disk since it was loaded. Aborting code generation.'); end
For more information, see Customize Build Process with STF_make_rtw_hook File (Simulink Coder).
sys — System name
character vector | string scalar
System name, specified as a character vector or string scalar.
tf — True or false result
True or false result, returned as a
true) — File that contains block diagram
syshas changed on disk since the block diagram was loaded.
false) — File that contains block diagram
syshas not changed on disk since the block diagram was loaded.