Main Content

sldiagviewer.reportInfo

Report information messages in Diagnostic Viewer

    Description

    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.

    example

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

    Examples

    collapse all

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

    Load the model DiagnosticDemo.

    model = "DiagnosticDemo";
    load_system(model);

    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
       1
    
    

    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"

    Example: "Simulink"

    Data Types: string | char

    Version History

    Introduced in R2014a