Main Content


Report information messages in Diagnostic Viewer


    sldiagviewer.reportInfo(Message) reports the message as information in the Diagnostic Viewer.


    output = sldiagviewer.reportInfo(Message) returns a logical 1 (true) when the information message reports successfully in the Diagnostic Viewer. Otherwise, an error message is displayed in the command window and no value is returned.

    output = sldiagviewer.reportInfo(__,'Component',ComponentNameValue) specifies the name of the component or product that generates the information message.


    collapse all

    Display information messages in the Diagnostic Viewer using sldiagviewer.reportInfo.

    Load the model vdp.

    model = 'vdp';

    Create a stage to display the diagnostic messages.

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

    Report a custom message in the Diagnostic Viewer.

    output = sldiagviewer.reportInfo('My info message')
    output = logical

    An information message displays in the Diagnostic Viewer in the stage Analysis.

    Input Arguments

    collapse all

    Custom message that is displayed in the Diagnostic Viewer as information, specified as a string, MSLException object, or MException object.

    Example: 'This is a custom information message'

    Name of the component or product that generates the diagnostic message, specified as a character vector or string.

    Example: 'Stateflow', 'Simulink', 'Model Advisor'

    Data Types: char | string

    Version History

    Introduced in R2014a