Main Content

setCallbackFcn

Class: ModelAdvisor.Action
Package: ModelAdvisor

Specify action callback function

Syntax

setCallbackFcn(action_obj, @handle)

Description

setCallbackFcn(action_obj, @handle) specifies the handle to the callback function, handle, to use with the action object, action_obj.

Examples

The following example is a fragment of code is from Create and Deploy a Model Advisor Custom Configuration. The example does not execute as shown without the additional content found in the sl_customization.m and defineDetailStyleCheck.m files.

% Create ModelAdvisor.Action object for setting fix operation.
myAction = ModelAdvisor.Action;
myAction.setCallbackFcn(@ActionCB);
myAction.Name='Make block names appear below blocks';
myAction.Description='Click the button to place block names below blocks';
rec.setAction(myAction);
mdladvRoot.publish(rec, 'Demo'); % publish check into Demo group.
end