Main Content

deselectCheckInstances

Class: Advisor.Application
Package: Advisor

Clear check instances from Model Advisor analysis

Description

You can clear check instances from Model Advisor analysis. A check instance is an instantiation of a ModelAdvisor.Check object in the Model Advisor configuration. When you change the Model Advisor configuration, the check instance ID might change. To obtain the check instance ID, use the getCheckInstanceIDs method.

example

deselectCheckInstances(app) clears all check instances from Model Advisor analysis.

example

deselectCheckInstances(app,Name,Value) clears check instances specified by Name,Value pair arguments from Model Advisor analysis.

Input Arguments

expand all

Advisor.Application object, created by Advisor.Manager.createApplication

Name-Value Arguments

Specify optional pairs of arguments as Name1=Value1,...,NameN=ValueN, where Name is the argument name and Value is the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.

Before R2021a, use commas to separate each name and value, and enclose Name in quotes.

Check instances to clear from Model Advisor analysis, as specified by a cell array of IDs

Data Types: cell

Examples

expand all

This example shows how to set the root model, create an Application object, set root analysis, and clear checks instances from Model Advisor analysis.

% Open the model
openExample('sldemo_mdlref_basic');

% Set root model to sldemo_mdlref_basic model
RootModel='sldemo_mdlref_basic';

% Create an Application object
app = Advisor.Manager.createApplication();

% Set the Application object root analysis
setAnalysisRoot(app,'Root',RootModel);

% Deselect all checks
deselectCheckInstances(app);

This example shows how to set the root model, create an Application object, set root analysis, and deselect checks instances using instance IDs.

% Open the model
openExample('sldemo_mdlref_basic');

% Set root model to sldemo_mdlref_basic model
RootModel='sldemo_mdlref_basic';

% Create an Application object
app = Advisor.Manager.createApplication();

% Set the Application object root analysis
setAnalysisRoot(app,'Root',RootModel);

% Deselect "Identify unconnected lines, input ports, and output 
% ports" check using instance ID
instanceID = getCheckInstanceIDs(app,'mathworks.design.UnconnectedLinesPorts');
checkinstanceID = instanceID(1);
deselectCheckInstances(app,'IDs',checkinstanceID);

Version History

Introduced in R2015b