deselectComponents

Class: Advisor.Application
Package: Advisor

Clear model components from Model Advisor analysis

Description

You can clear model components from Model Advisor analysis. A model component is a model in the system hierarchy. Models that the root model references and that Advisor.Application.setAnalysisRoot specifies are model components.

example

deselectComponents(app) clears all components from Model Advisor analysis.

example

deselectComponents(app,Name,Value) clears model components specified by Name,Value pair arguments from Model Advisor analysis.

Input Arguments

expand all

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

Name-Value Pair Arguments

Specify optional comma-separated pairs of Name,Value arguments. Name is the argument name and Value is the corresponding value. Name must appear inside quotes. You can specify several name and value pair arguments in any order as Name1,Value1,...,NameN,ValueN.

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

Data Types: cell

Clear components specified by IDs and component children from Model Advisor analysis

Data Types: logical

Examples

expand all

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

% 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 components
deselectComponents(app);

This example shows how to set the root model, create an Application object, set root analysis, and clear model components using IDs.

% 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 component using IDs
deselectComponents(app,'IDs',RootModel);
Introduced in R2015b