ModelAdvisor.Action - Add actions to custom checks

Class Description

You define actions to take when Model Advisor checks do not pass. Users access actions by clicking the action button that you define in the Model Advisor window.

Syntax

action_obj = ModelAdvisor.Action

Arguments

action_obj

A variable representing the action object you create.

Method Summary

NameDescription
setCallbackFcnSpecify action callback function

Methods

setCallbackFcn

Purpose

Specify action callback function

Syntax

action_obj.setCallbackFcn(@handle)

Arguments

action_obj

A variable representing the action object.

handle

A handle to an action callback function.

Description

The setCallbackFcn method specifies the callback function to use with the action object.

See Also

Action Callback Function

Example

See Demo and Code Example for more information.

rec = ModelAdvisor.Check('com.mathworks.sample.Check1');
% define action (fix) operation
myAction = ModelAdvisor.Action;
%Specify a callback function for the action
myAction.setCallbackFcn(@sampleActionCB);
myAction.Name='Fix block fonts';
myAction.Description=...
    'Click the button to update all blocks with specified font';
rec.setAction(myAction);

See Also

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS