Main Content

slreportgen.utils.isModelLoaded

Check if model is loaded

Description

example

tf = slreportgen.utils.isModelLoaded(model) tests whether the input Simulink® model is loaded into memory.

Examples

Check If Model Is Loaded

Run the following command to access the supporting files used in this example.

openExample('rptgenext/SimulinkReportGeneratorFilesExample');
load_system('slrgex_sf_car')
tf = slreportgen.utils.isModelLoaded('slrgex_sf_car')
tf =

  logical

   1

In this case, the slrgex_sf_car model is loaded.

Input Arguments

collapse all

Model to check for being loaded, specified as a string or character array of the model path or handle.

Output Arguments

collapse all

Whether input model is loaded into memory, returned as 1 (true) if the input model is loaded. Otherwise, it returns 0 (false).

Version History

Introduced in R2018b