Main Content

sldiagviewer.createStage

Create a stage to display diagnostic messages

Description

myStage = sldiagviewer.createStage(StageName) creates a stage with the given stage name in the model specified. In the Diagnostic Viewer, errors, warnings, and information messages are displayed in groups based on the operation, such as model load, simulation, and build. These groups are called stages. When you create a stage object, Simulink initializes the stage. When you close the stage object, Simulink ends the stage. If you delete a parent stage object, the corresponding parent and its child stage close in the Diagnostic Viewer.

myStage = sldiagviewer.createStage(__,'ModelName', Value) is a required name-value pair that specifies the model in which the diagnostics is run.

Examples

collapse all

Use the createStage function to create a stage to display diagnostic messages in the Diagnostic Viewer.

% Create a Stage to display all the messages

myStage = sldiagviewer.createStage('Analysis','ModelName','vdp');

myStage = 
  Stage with no properties.

Input Arguments

collapse all

Name of the stage, specified as a character vector.

Example: 'Analysis'

Data Types: string

Name of model, specified as a comma-separated pair consisting of 'ModelName' and a character vector or string.

Example: 'vdp'

Output Arguments

collapse all

Handle to the created stage, returned as a stage object.

Introduced in R2014a