Main Content

Simulink.getSuppressedDiagnostics

ReturnSimulink.SuppressedDiagnosticobjects associated with a block, subsystem, or model

Description

example

suppressed_diagnostics= Simulink.getSuppressedDiagnostics(source)returns an array ofSimulink.SuppressedDiagnosticobjects that are associated with the specified source.

Examples

collapse all

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

Use theSimulink.suppressDiagnosticfunction to suppress the parameter precision loss warning thrown by theConstantblock,one.

Simulink.suppressDiagnostic('Suppressor_CLI_Demo/one',...'SimulinkFixedPoint:util:fxpParameterPrecisionLoss');

Get theSimulink.SuppressedDiagnosticobjects 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 thegcbfunction.

To get the block handle, use thegetSimulinkBlockHandlefunction.

Data Types:char|cell

Output Arguments

collapse all

Suppressed diagnostics, returned as an array ofSimulink.SuppressedDiagnosticobjects.

版本历史

Introduced in R2016b