Main Content


Return Simulink.SuppressedDiagnostic objects associated with a block, subsystem, or model



suppressed_diagnostics = Simulink.getSuppressedDiagnostics(source) returns an array of Simulink.SuppressedDiagnostic objects that are associated with the specified source.


collapse all

Using the model from Suppress Diagnostic Messages Programmatically, get all suppressed diagnostics associated with a specified block.

Use the Simulink.suppressDiagnostic function to suppress the parameter precision loss warning thrown by the Constant block, one.


Get the Simulink.SuppressedDiagnostic objects associated with the block.

suppressed_diagnostic = Simulink.getSuppressedDiagnostics('Suppressor_CLI_Demo/one')
suppressed_diagnostic = 

  SuppressedDiagnostic with properties:

            Source: 'Suppressor_CLI_Demo/one'
                Id: 'SimulinkFixedPoint:util:fxpParameterPrecis…'
    LastModifiedBy: ''
          Comments: ''
      LastModified: '2016-Jul-04 14:12:24'

Input Arguments

collapse all

The source of the diagnostic, specified as a model, subsystem, block path, block handle, cell array of block paths, or cell array of block handles.

To get the block path, use the gcb function.

To get the block handle, use the getSimulinkBlockHandle function.

Data Types: char | cell

Output Arguments

collapse all

Suppressed diagnostics, returned as an array of Simulink.SuppressedDiagnostic objects.

Version History

Introduced in R2016b