Main Content

disable

Disable check and folder instances in configuration

Since R2024b

Description

disable (CfgObj,CheckInstanceID) disables the specified check CheckInstanceID in the Model Advisor configuration accessed by the CfgObj object. Disabling a check that is included in the Model Advisor analysis prevents you from excluding the check from the analysis. Similarly, if you disable a check which is excluded from the analysis, you can not choose to include it to the analysis. To include or exclude a disabled check to or from the analysis, you must first enable the check by using the enable function.

example

disable (CfgObj,FolderInstanceID) disables the folder instance specified in FolderInstanceID and the checks in it.

Examples

collapse all

Disable check instances in an existing configuration file, myCustomFile.json, located in your working directory.

Create a Model Advisor configuration object.

CfgObj = Advisor.Config;

Load the existing configuration file myCustomFile.json.

loadConfig(CfgObj,'myCustomFile.json');

Add the checks with IDs mathworks.jmaab.jc_0231 and mathworks.jmaab.jc_0222 under the root node.

addCheck(CfgObj,'_SYSTEM','mathworks.jmaab.jc_0231');
addCheck(CfgObj,'_SYSTEM','mathworks.jmaab.jc_0222');

Disable the check instances.

disable(CfgObj,'_SYSTEM_mathworks.jmaab.jc_0231');
disable(CfgObj,'_SYSTEM_mathworks.jmaab.jc_0222');

Input Arguments

collapse all

Model Advisor configuration object, specified as an Advisor.Config object.

By default, after creation, the object provides you access to an editable blank configuration that you can use to create a new custom configuration. To customize an existing configuration, load the configuration JSON file as the active configuration by using loadConfig.

Check instance ID, specified as a character vector or string scalar. The instance ID represents the location of the check in the configuration in the form _SYSTEM_Check Hierarchy_Check ID.

Example: '_SYSTEM_By Product_mathworks.jmaab.ar_0001'

Folder instance ID, specified as a character vector or string scalar. The instance ID represents the location of the folder in the configuration in the form _SYSTEM_Folder Hierarchy.

Example: '_SYSTEM_By Product'

Alternative Functionality

App

You can also use the Model Advisor Configuration Editor to modify existing configurations and create new configurations. In the Model Advisor Configuration Editor, to disable a check or folder, right-click on the folder or check and select Disable. For more information, see Use Model Advisor Configuration Editor to Customize Model Advisor.

Version History

Introduced in R2024b