主要内容

ModelAdvisor.Check.setAction

R2026b

Specify action for check

Description

setAction(check_obj,action_obj) assigns the action object action_obj to the check object specified by check_obj.

Examples

collapse all

This example shows how to assign an action object to a Model Advisor check object.

Create a Model Advisor check object.

checkobj_1 = ModelAdvisor.Check('com.mathworks.myUniqueCheck');

Create an action object.

pushAction = ModelAdvisor.Action;
pushAction.Name = 'Custom Push Action';
pushAction.Description = 'This is a custom push action for the check.';

Assign the push action to the check object.

setAction(checkobj_1, pushAction);

Input Arguments

collapse all

Model Advisor check object, specified as a ModelAdvisor.Check object.

Specifies the action to associate with the check object.

Version History

Introduced in R2008a